//! Application type definitions.

/// Type of application determines directory conventions.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum AppType {
    /// Command-line interface application.
    /// Uses XDG directories on Unix, %APPDATA% on Windows.
    #[default]
    Cli,

    /// Graphical user interface application.
    /// Uses platform-specific GUI directories.
    Gui,

    /// System service/daemon.
    /// Uses system directories, may require elevated permissions.
    Service,
}

impl AppType {
    /// Returns true if this is a GUI application.
    #[must_use]
    pub const fn is_gui(self) -> bool {
        matches!(self, Self::Gui)
    }

    /// Returns true if this is a CLI application.
    #[must_use]
    pub const fn is_cli(self) -> bool {
        matches!(self, Self::Cli)
    }

    /// Returns true if this is a service application.
    #[must_use]
    pub const fn is_service(self) -> bool {
        matches!(self, Self::Service)
    }
}
