use crate::condition::ValueCondition;
#[derive(Clone, Debug, Default)]
pub struct ValueStyleMap {
condition: String,
applied_style: String,
}
impl ValueStyleMap {
pub fn new<T: Into<String>>(condition: ValueCondition, applied_style: T) -> Self {
Self {
condition: condition.to_string(),
applied_style: applied_style.into(),
}
}
pub fn condition(&self) -> &String {
&self.condition
}
pub fn set_condition(&mut self, cond: ValueCondition) {
self.condition = cond.to_string();
}
pub fn applied_style(&self) -> &String {
&self.applied_style
}
pub fn set_applied_style<S: Into<String>>(&mut self, style: S) {
self.applied_style = style.into();
}
}