package dev.inmo.postssystem.features.common.common

import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow

interface UIModel<StateType> {
    val currentState: StateFlow<StateType>
}

abstract class AbstractUIModel<StateType>(
    initState: StateType
) : UIModel<StateType> {
    protected val _currentState = DefaultMVVMStateFlow(initState)
    override val currentState: StateFlow<StateType> = _currentState.asStateFlow()
}
