use cvkg_core::{View, Never};

/// Linear or circular progress indicator
#[allow(dead_code)]
pub struct ProgressView {
    pub(crate) value: f32,
    pub(crate) total: f32,
}

impl ProgressView {
    /// Create a new ProgressView.
    ///
    /// # Examples
    /// ```
    /// use cvkg_components::ProgressView;
    /// let progress = ProgressView::new(0.5, 1.0);
    /// ```
    pub fn new(value: f32, total: f32) -> Self {
        Self { value, total }
    }
}

impl View for ProgressView {
    type Body = Never;
    fn body(self) -> Self::Body { unreachable!() }
}

/// Radial or linear gauge display
#[allow(dead_code)]
pub struct Gauge {
    pub(crate) value: f32,
    pub(crate) range: std::ops::RangeInclusive<f32>,
}

impl Gauge {
    /// Create a new Gauge.
    ///
    /// # Examples
    /// ```
    /// use cvkg_components::Gauge;
    /// let gauge = Gauge::new(50.0, 0.0..=100.0);
    /// ```
    pub fn new(value: f32, range: std::ops::RangeInclusive<f32>) -> Self {
        Self { value, range }
    }
}

impl View for Gauge {
    type Body = Never;
    fn body(self) -> Self::Body { unreachable!() }
}
