//! Work schedules for the Baker family
//!
//! Demonstrates schedule composition features:
//! - extends keyword for schedule inheritance
//! - override blocks to modify inherited schedules
//! - Named blocks for override system
//! - Action references to behavior trees
//! - Recurrence patterns for weekly variations

// Base work schedule (9-5 job)
schedule WorkWeek {
    block morning_prep { 08:00 -> 09:00, action: MorningPrep }
    block work { 09:00 -> 17:00, action: DailyWork }
    block evening_rest { 18:00 -> 22:00, action: Resting }
}

// Baker's schedule extends WorkWeek
schedule BakerSchedule extends WorkWeek {
    // Bakers start early - override the work block
    override work {
        05:00 -> 13:00
        action: BakingWork
        intensity: "high"
    }

    // Add pre-dawn prep
    block pre_dawn_prep {
        04:00 -> 05:00
        action: PrepKitchen
    }

    // Market day on Saturdays
    recurrence MarketDay on Saturday {
        block market {
            06:00 -> 14:00
            action: SellAtMarket
            place: "town_square"
        }
    }
}

// Assistant baker schedule (helps during busy times)
schedule AssistantSchedule extends BakerSchedule {
    // Assistant comes in later
    override work {
        06:00 -> 14:00
        action: AssistWithBaking
    }

    // Assistant does a quick prep before work
    override pre_dawn_prep {
        05:30 -> 06:00
        action: QuickPrep
    }
}
