use thiserror::Error;

#[derive(Debug, Error)]
pub enum CliError {
    #[error("IO error: {0}")]
    Io(#[from] std::io::Error),

    #[error("Configuration error: {0}")]
    Config(#[from] lmrc_config_validator::ConfigError),

    #[allow(dead_code)]
    #[error("Workspace error: {0}")]
    Workspace(String),

    #[error("Prompt error: {0}")]
    Prompt(#[from] inquire::InquireError),

    #[allow(dead_code)]
    #[error("Generation error: {0}")]
    Generation(String),

    #[allow(dead_code)]
    #[error("Invalid path: {0}")]
    InvalidPath(String),

    #[error("Project already exists at: {0}")]
    ProjectExists(String),
}

pub type Result<T> = std::result::Result<T, CliError>;
