package com.tt.honeyDue.storage

/**
 * Platform-specific task cache manager interface for persistent storage.
 * Each platform implements this using their native storage mechanisms.
 */
@Suppress("NO_ACTUAL_FOR_EXPECT")
expect class TaskCacheManager {
    fun saveTasks(tasksJson: String)
    fun getTasks(): String?
    fun clearTasks()

    /**
     * Check if tasks need refresh due to widget interactions.
     * Returns true if data was modified externally (e.g., by a widget).
     */
    fun areTasksDirty(): Boolean

    /**
     * Mark tasks as dirty (needs refresh).
     * Called when widget modifies task data.
     */
    fun markTasksDirty()

    /**
     * Clear the dirty flag after tasks have been refreshed.
     */
    fun clearDirtyFlag()
}
