package com.recordatorios.app

import android.content.Intent
import android.widget.RemoteViewsService

class TodayWidgetService : RemoteViewsService() {
    override fun onGetViewFactory(intent: Intent): RemoteViewsFactory {
        val appWidgetId = intent.getIntExtra(
            android.appwidget.AppWidgetManager.EXTRA_APPWIDGET_ID,
            android.appwidget.AppWidgetManager.INVALID_APPWIDGET_ID
        )
        val showTime = intent.getBooleanExtra("show_time", true)
        val showCategory = intent.getBooleanExtra("show_category", true)
        val maxItems = intent.getIntExtra("max_items", 10)
        return TodayWidgetFactory(applicationContext, appWidgetId, showTime, showCategory, maxItems)
    }
}
