package litigationplanner

import "time"

// HolidayCalendar adjusts dates onto working days for a given
// (country, regime) pair. The calculator only needs three primitives:
//
//   - IsNonWorkingDay  — used by the addWorkingDays walker
//   - AdjustForNonWorkingDays         — forward snap (timing='after')
//   - AdjustForNonWorkingDaysBackward — backward snap (timing='before')
//   - AdjustForNonWorkingDaysWithReason — like the forward snap but
//     also returns *AdjustmentReason so the timeline can render the
//     "rolled past holiday X" footer in TimelineEntry.AdjustmentReason.
//
// Implementations:
//   - paliad: reads paliad.holidays, caches per-year, merges DE
//     federal fallback.
//   - embedded/upc (Slice C): in-memory year-keyed map populated from
//     the embedded JSON snapshot.
type HolidayCalendar interface {
	IsNonWorkingDay(date time.Time, country, regime string) bool
	AdjustForNonWorkingDays(date time.Time, country, regime string) (adjusted, original time.Time, wasAdjusted bool)
	AdjustForNonWorkingDaysBackward(date time.Time, country, regime string) (adjusted, original time.Time, wasAdjusted bool)
	AdjustForNonWorkingDaysWithReason(date time.Time, country, regime string) (adjusted, original time.Time, wasAdjusted bool, reason *AdjustmentReason)
}
