use crate::formatter::{FormatTable, Render, format_args::FormatArg};

#[derive(Debug, Clone, Default)]
pub(super) struct Tag<'a> {
    pub args: Vec<FormatArg<'a>>,
}

impl<'a> Render for Tag<'a> {
    fn render(&self, format_table: &FormatTable) -> String {
        let key = self.args.render(format_table);
        format_table.table().get(&key).cloned().unwrap_or_default()
    }
}
