import Foundation

struct RitualSeedService: RitualSeedProviding {
    func makeSeedRituals(startDate: Date) -> [Ritual] {
        // Create morning ritual with arc
        let morningHabits = [
            ArcHabit(title: String(localized: "Hydrate"), symbolName: "drop.fill"),
            ArcHabit(title: String(localized: "Stretch"), symbolName: "figure.walk"),
            ArcHabit(title: String(localized: "Mindful minute"), symbolName: "sparkles")
        ]
        let morningArc = RitualArc(
            startDate: startDate,
            durationDays: 28,
            arcNumber: 1,
            isActive: true,
            habits: morningHabits
        )
        let morningRitual = Ritual(
            title: String(localized: "Morning Clarity"),
            theme: String(localized: "Fresh starts"),
            defaultDurationDays: 28,
            notes: String(localized: "A gentle 4-week arc for energy and focus."),
            timeOfDay: .morning,
            iconName: "sunrise.fill",
            category: String(localized: "Wellness"),
            arcs: [morningArc]
        )

        // Create evening ritual with arc
        let eveningHabits = [
            ArcHabit(title: String(localized: "No screens"), symbolName: "moon.stars.fill"),
            ArcHabit(title: String(localized: "Read 10 pages"), symbolName: "book.fill"),
            ArcHabit(title: String(localized: "Reflect"), symbolName: "pencil.and.list.clipboard")
        ]
        let eveningStartDate = Calendar.current.date(byAdding: .day, value: -14, to: startDate) ?? startDate
        let eveningArc = RitualArc(
            startDate: eveningStartDate,
            durationDays: 28,
            arcNumber: 1,
            isActive: true,
            habits: eveningHabits
        )
        let eveningRitual = Ritual(
            title: String(localized: "Evening Reset"),
            theme: String(localized: "Soft landings"),
            defaultDurationDays: 28,
            notes: String(localized: "Wind down with quiet, consistent cues."),
            timeOfDay: .evening,
            iconName: "moon.stars.fill",
            category: String(localized: "Wellness"),
            arcs: [eveningArc]
        )

        return [morningRitual, eveningRitual]
    }
}
