use super::{BasePattern, component_json};
use serde_json::Value;
pub struct ExecutivePattern {
base: BasePattern,
}
impl ExecutivePattern {
pub fn new() -> Self {
Self {
base: BasePattern::new(),
}
}
pub fn with_hero_summary(mut self, data: Value) -> Self {
self.base.hero = Some(component_json("hero-summary", data));
self
}
pub fn add_summary(mut self, items: Vec<Value>) -> Self {
self.base.context.extend(items);
self
}
pub fn add_key_metrics(mut self, items: Vec<Value>) -> Self {
self.base.analysis.extend(items);
self
}
pub fn add_top_findings(mut self, items: Vec<Value>) -> Self {
self.base.analysis.extend(items);
self
}
pub fn add_risk_overview(mut self, data: Value) -> Self {
self.base.analysis.push(component_json("impact-grid", data));
self
}
pub fn add_recommendation(mut self, items: Vec<Value>) -> Self {
self.base.solution.extend(items);
self
}
pub fn add_implementation_plan(mut self, data: Value) -> Self {
self.base.actions.push(component_json("phase-block", data));
self
}
pub fn add_timeline(mut self, data: Value) -> Self {
self.base.actions.push(component_json("timeline", data));
self
}
pub fn with_cta(mut self, data: Value) -> Self {
self.base.cta = Some(component_json("cta-box", data));
self
}
pub fn to_components(self) -> Vec<Value> {
self.base.to_components()
}
}
impl Default for ExecutivePattern {
fn default() -> Self {
Self::new()
}
}