use crate::{
    commands::{Cli, Result},
    views::CompanyView,
};
use clap::Parser;

#[derive(Parser, Debug)]
pub(crate) struct ShowCompany;

impl ShowCompany {
    pub(crate) fn run(&self, cli: &Cli) -> Result<()> {
        println!();
        let database = cli.open_database()?;
        print!("{}", CompanyView::new(&database, cli.ansi())?);
        Ok(())
    }
}
