use super::*;

impl AddAssign<Self> for CyberWaifuTags {
    fn add_assign(&mut self, rhs: Self) {
        for (k, v) in rhs.tags.into_iter() {
            self.push_tag(k, v);
        }
    }
}

impl SubAssign<Self> for CyberWaifuTags {
    fn sub_assign(&mut self, rhs: Self) {
        for (k, v) in rhs.tags.into_iter() {
            self.push_tag(k, -v);
        }
    }
}

impl SubAssign<&str> for CyberWaifuTags {
    fn sub_assign(&mut self, rhs: &str) {
        self.remove_tag(rhs);
    }
}

impl MulAssign<f32> for CyberWaifuTags {
    fn mul_assign(&mut self, rhs: f32) {
        for (_, v) in self.tags.iter_mut() {
            *v *= rhs
        }
    }
}

impl DivAssign<f32> for CyberWaifuTags {
    fn div_assign(&mut self, rhs: f32) {
        for (_, v) in self.tags.iter_mut() {
            *v /= rhs
        }
    }
}
