use std::fmt::Debug;

use crate::render::Layer;

pub enum MonitorInputMsg {
    AddLayer(Layer),
    RemoveLayer(usize),
    UpdateLayer((usize, Box<dyn Fn(&mut Layer) + 'static>)),
    None,
}

impl Debug for MonitorInputMsg {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            MonitorInputMsg::AddLayer(_) => write!(f, "MonitorInputMsg::AddLayer"),
            MonitorInputMsg::RemoveLayer(_) => write!(f, "MonitorInputMsg::RemoveLayer"),
            MonitorInputMsg::UpdateLayer(_) => write!(f, "MonitorInputMsg::UpdateLayer"),
            MonitorInputMsg::None => write!(f, "MonitorInputMsg::None"),
        }
    }

}

#[derive(Debug)]
pub enum MonitorOutputMsg {
    LayerAdded(usize),
    LayerRemoved(usize),
    LayerUpdated(usize),
}

#[derive(Debug)]
pub enum RenderInputMsg {
    Monitor(MonitorInputMsg),
}
