use super::*;
mod traits;
#[derive(Debug, Clone, Default, Ord, PartialOrd, Eq, PartialEq, Hash)]
pub struct CssAttributes {
    normal: ImportantMap,
    transforms: ImportantSet,
    backdrop_filter: ImportantSet,
    filter: ImportantSet,
}
impl CssAttributes {
    #[track_caller]
    pub fn insert<K, V>(&mut self, key: K, value: V)
    where
        K: Into<String>,
        V: Into<String>,
    {
        let key = key.into();
        match key.as_str() {
            "transform" => self.transforms.insert(value.into()),
            "backdrop-filter" => self.backdrop_filter.insert(value.into()),
            "filter" => self.filter.insert(value.into()),
            _ => self.normal.insert(key, value.into()),
        };
    }
    pub fn extend<T>(&mut self, items: T)
    where
        T: IntoIterator<Item = (String, String)>,
    {
        for i in items {
            self.insert(i.0, i.1);
        }
    }
}