//! `sbol` — command-line tool for SBOL 3 documents.
//!
//! See `sbol validate --help` for the full surface.

use std::process::ExitCode;

use clap::Parser;

mod cli;
mod commands;
mod output;
mod style;

#[cfg(feature = "sarif")]
mod sarif;

use cli::{Cli, Command};
use style::Styles;

fn main() -> ExitCode {
    let cli = Cli::parse();
    let styles = Styles::resolve(cli.color);
    match cli.command {
        Command::Validate(args) => commands::validate(args, styles),
        Command::Convert(args) => commands::convert(args, styles),
        Command::Upgrade(args) => commands::upgrade(args, styles),
        Command::Downgrade(args) => commands::downgrade(args, styles),
        Command::ImportGenbank(args) => commands::import_genbank(args, styles),
        Command::ImportFasta(args) => commands::import_fasta(args, styles),
        Command::Rules(command) => commands::rules(command, styles),
        Command::Ontology(command) => commands::ontology(command, styles),
    }
}
