use nu_plugin::{Plugin, PluginCommand};

use crate::commands::{
    CreateBundle, ExtractMessages, ListLocales, Localize, ParseFtl, ValidateFtl,
};

pub struct FluentPlugin;

impl Plugin for FluentPlugin {
    fn version(&self) -> String {
        env!("CARGO_PKG_VERSION").into()
    }

    fn commands(&self) -> Vec<Box<dyn PluginCommand<Plugin = Self>>> {
        vec![
            Box::new(ParseFtl),
            Box::new(Localize),
            Box::new(ValidateFtl),
            Box::new(ExtractMessages),
            Box::new(ListLocales),
            Box::new(CreateBundle),
        ]
    }
}

