pub(crate) mod demo;

use super::{app::AppCommand, RefreshHint};

pub(crate) struct ScreenUpdate {
    pub dirty: bool,
    pub refresh: RefreshHint,
    pub command: Option<AppCommand>,
}

impl ScreenUpdate {
    pub const fn new(dirty: bool, refresh: RefreshHint) -> Self {
        Self {
            dirty,
            refresh,
            command: None,
        }
    }

    pub const fn with_command(dirty: bool, refresh: RefreshHint, command: AppCommand) -> Self {
        Self {
            dirty,
            refresh,
            command: Some(command),
        }
    }
}
