All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.epicarchitect.calendar.compose.datepicker.state.State.kt Maven / Gradle / Ivy

The newest version!
package epicarchitect.calendar.compose.datepicker.state

import androidx.compose.runtime.compositionLocalOf
import epicarchitect.calendar.compose.datepicker.config.EpicDatePickerConfig
import epicarchitect.calendar.compose.pager.state.EpicCalendarPagerState
import kotlinx.datetime.LocalDate

interface EpicDatePickerState {
    val config: EpicDatePickerConfig
    val pagerState: EpicCalendarPagerState
    val selectedDates: List
    var selectionMode: SelectionMode
    fun toggleDateSelection(date: LocalDate)

    sealed interface SelectionMode {
        data class Single(val maxSize: Int = 1) : SelectionMode
        object Range : SelectionMode
    }
}

val LocalEpicDatePickerState = compositionLocalOf {
    null
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy