use ical::{component::vevent::VEVENT, prop::summary::SUMMARY, tree::cst::IcalCst};
fn main() {
let raw = concat!(
"BEGIN:VCALENDAR\r\n",
"VERSION:2.0\r\n",
"PRODID:-//Example Corp//Calendar//EN\r\n",
"BEGIN:VEVENT\r\n",
"UID:42@example.com\r\n",
"DTSTAMP:20260101T000000Z\r\n",
"DTSTART:20260102T120000Z\r\n",
"SUMMARY:Lunch\r\n",
"END:VEVENT\r\n",
"END:VCALENDAR\r\n",
);
let mut cal = IcalCst::parse(raw).unwrap();
cal.component_mut::<VEVENT>()
.unwrap()
.prop_mut::<SUMMARY>()
.unwrap()
.set_text("Dinner");
print!("{cal}");
}