-- Phase A seed: holidays 2026 + 2027.
--
-- German federal public holidays (observed in all 16 Länder).
-- Easter-relative dates computed manually using Gregorian-algorithm output:
--   2026: Easter = 2026-04-05  (Karfreitag 04-03, Ostermontag 04-06,
--                               Christi Himmelfahrt 05-14,
--                               Pfingstsonntag 05-24, Pfingstmontag 05-25)
--   2027: Easter = 2027-03-28  (Karfreitag 03-26, Ostermontag 03-29,
--                               Christi Himmelfahrt 05-06,
--                               Pfingstsonntag 05-16, Pfingstmontag 05-17)
--
-- UPC judicial vacations (official 2026 periods per UPC Annual Report of work):
--   Winter: 24 Dec 2026 – 6 Jan 2027 (holiday_type = 'vacation')
--   Summer: 27 Jul 2026 – 28 Aug 2026 (holiday_type = 'vacation')
--
-- For 2027 we seed known-fixed dates + Easter-derived set; summer/winter UPC
-- vacations are added once the UPC publishes them.

-- ============================================================================
-- German federal — 2026
-- ============================================================================
INSERT INTO paliad.holidays (date, name, country, holiday_type) VALUES
    ('2026-01-01', 'Neujahr',                    'DE', 'public_holiday'),
    ('2026-04-03', 'Karfreitag',                 'DE', 'public_holiday'),
    ('2026-04-05', 'Ostersonntag',               'DE', 'public_holiday'),
    ('2026-04-06', 'Ostermontag',                'DE', 'public_holiday'),
    ('2026-05-01', 'Tag der Arbeit',             'DE', 'public_holiday'),
    ('2026-05-14', 'Christi Himmelfahrt',        'DE', 'public_holiday'),
    ('2026-05-24', 'Pfingstsonntag',             'DE', 'public_holiday'),
    ('2026-05-25', 'Pfingstmontag',              'DE', 'public_holiday'),
    ('2026-10-03', 'Tag der Deutschen Einheit',  'DE', 'public_holiday'),
    ('2026-12-25', '1. Weihnachtstag',           'DE', 'public_holiday'),
    ('2026-12-26', '2. Weihnachtstag',           'DE', 'public_holiday')
ON CONFLICT (date, name, country) DO NOTHING;

-- ============================================================================
-- UPC summer vacation 2026 (27 Jul – 28 Aug, weekdays only — weekends are
-- already non-working days, storing the whole span as vacation entries)
-- ============================================================================
INSERT INTO paliad.holidays (date, name, country, holiday_type) VALUES
    ('2026-07-27', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-07-28', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-07-29', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-07-30', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-07-31', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-03', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-04', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-05', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-06', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-07', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-10', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-11', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-12', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-13', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-14', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-17', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-18', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-19', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-20', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-21', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-24', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-25', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-26', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-27', 'UPC Summer Vacation', 'UPC', 'vacation'),
    ('2026-08-28', 'UPC Summer Vacation', 'UPC', 'vacation')
ON CONFLICT (date, name, country) DO NOTHING;

-- ============================================================================
-- UPC winter vacation 2026 → 2027 (24 Dec 2026 – 6 Jan 2027, weekdays)
-- ============================================================================
INSERT INTO paliad.holidays (date, name, country, holiday_type) VALUES
    ('2026-12-24', 'UPC Winter Vacation', 'UPC', 'vacation'),
    ('2026-12-28', 'UPC Winter Vacation', 'UPC', 'vacation'),
    ('2026-12-29', 'UPC Winter Vacation', 'UPC', 'vacation'),
    ('2026-12-30', 'UPC Winter Vacation', 'UPC', 'vacation'),
    ('2026-12-31', 'UPC Winter Vacation', 'UPC', 'vacation'),
    ('2027-01-04', 'UPC Winter Vacation', 'UPC', 'vacation'),
    ('2027-01-05', 'UPC Winter Vacation', 'UPC', 'vacation'),
    ('2027-01-06', 'UPC Winter Vacation', 'UPC', 'vacation')
ON CONFLICT (date, name, country) DO NOTHING;

-- ============================================================================
-- German federal — 2027 (so deadlines falling into early 2027 adjust correctly)
-- ============================================================================
INSERT INTO paliad.holidays (date, name, country, holiday_type) VALUES
    ('2027-01-01', 'Neujahr',                    'DE', 'public_holiday'),
    ('2027-03-26', 'Karfreitag',                 'DE', 'public_holiday'),
    ('2027-03-28', 'Ostersonntag',               'DE', 'public_holiday'),
    ('2027-03-29', 'Ostermontag',                'DE', 'public_holiday'),
    ('2027-05-01', 'Tag der Arbeit',             'DE', 'public_holiday'),
    ('2027-05-06', 'Christi Himmelfahrt',        'DE', 'public_holiday'),
    ('2027-05-16', 'Pfingstsonntag',             'DE', 'public_holiday'),
    ('2027-05-17', 'Pfingstmontag',              'DE', 'public_holiday'),
    ('2027-10-03', 'Tag der Deutschen Einheit',  'DE', 'public_holiday'),
    ('2027-12-25', '1. Weihnachtstag',           'DE', 'public_holiday'),
    ('2027-12-26', '2. Weihnachtstag',           'DE', 'public_holiday')
ON CONFLICT (date, name, country) DO NOTHING;
