package com.diegocayo.organizame.presentation.features.main.tasks.create

import com.diegocayo.organizame.data.local.entity.TaskPriority
import com.diegocayo.organizame.domain.model.Subject

data class CreateTaskState(
    val title: String = "",
    val description: String = "",
    val selectedSubject: Subject? = null,
    val subjects: List<Subject> = emptyList(),
    val priority: TaskPriority = TaskPriority.LOW,
    val scheduledDate: Long = System.currentTimeMillis(),
    val showDatePicker: Boolean = false,
    val isLoading: Boolean = false,
    val isTaskCreated: Boolean = false,
    val error: String? = null,
    val isFormValid: Boolean = false
)

sealed class CreateTaskEvent {
    data class OnTitleChange(val title: String) : CreateTaskEvent()
    data class OnDescriptionChange(val description: String) : CreateTaskEvent()
    data class OnSubjectSelect(val subject: Subject?) : CreateTaskEvent()
    data class OnPrioritySelect(val priority: TaskPriority) : CreateTaskEvent()
    data class OnDateSelect(val timestamp: Long) : CreateTaskEvent()
    data object OnShowDatePicker : CreateTaskEvent()
    data object OnHideDatePicker : CreateTaskEvent()
    data object OnCreateTask : CreateTaskEvent()
} 