/**
 * Master travel catalogue.
 *
 * Everything downstream (tours, trips, hotels, flights, transport, itineraries)
 * is generated FROM this file so relationships stay internally consistent:
 *
 *   Destination -> Cities -> Hotels
 *   Destination -> Gateway airport -> Airlines -> Flight numbers
 *   Destination -> Permitted transport types -> Vehicles -> Local drivers
 *   Destination -> Tours -> Trips
 *
 * A Swiss trip can never reference a Japanese hotel or an Indian coach driver.
 */

export interface DestinationSpec {
  name: string;
  country: string;
  region: string;
  scope: "Domestic" | "International";
  /** Arrival airport for the journey. */
  airport: string;
  airportName: string;
  gatewayCity: string;
  cities: string[];
  hotels: { name: string; city: string; rating: number }[];
  airlines: { name: string; code: string }[];
  transportTypes: string[];
  activities: string[];
  dial: string;
  drivers: string[];
  tours: string[];
  bestTime: string;
  travelStyle: string;
}

export const VEHICLES: Record<string, string[]> = {
  Coach: ["Mercedes Tourismo 49-seater", "Volvo 9700 45-seater", "Setra S 516 40-seater"],
  Minibus: ["Mercedes Sprinter 19-seater", "Toyota Hiace 15-seater"],
  Sedan: ["Skoda Superb", "Mercedes E-Class", "Toyota Camry"],
  SUV: ["Toyota Innova Crysta", "Toyota Fortuner", "Mahindra Scorpio-N"],
  "4x4 Safari Vehicle": ["Toyota Land Cruiser 4x4", "Land Rover Defender Safari"],
  "Rail transfer": ["Reserved first-class carriage", "Reserved standard carriage"],
  "Boat transfer": ["Private launch", "Traditional houseboat"],
};

/** Indian departure gateways used for outbound flights. */
export const ORIGIN_AIRPORTS = [
  { code: "BOM", city: "Mumbai", name: "Chhatrapati Shivaji Maharaj Intl" },
  { code: "DEL", city: "Delhi", name: "Indira Gandhi Intl" },
  { code: "BLR", city: "Bengaluru", name: "Kempegowda Intl" },
  { code: "MAA", city: "Chennai", name: "Chennai Intl" },
];

export const DESTINATIONS: DestinationSpec[] = [
  {
    name: "Switzerland",
    country: "Switzerland",
    region: "Europe",
    scope: "International",
    airport: "ZRH",
    airportName: "Zurich Airport",
    gatewayCity: "Zurich",
    cities: ["Zurich", "Lucerne", "Interlaken", "Zermatt", "Montreux"],
    hotels: [
      { name: "Hotel Schweizerhof Lucerne", city: "Lucerne", rating: 5 },
      { name: "Victoria Jungfrau Grand", city: "Interlaken", rating: 5 },
      { name: "Riffelalp Resort", city: "Zermatt", rating: 5 },
      { name: "Zurich Marriott Hotel", city: "Zurich", rating: 4 },
      { name: "Fairmont Le Montreux Palace", city: "Montreux", rating: 5 },
    ],
    airlines: [
      { name: "Swiss International Air Lines", code: "LX" },
      { name: "Lufthansa", code: "LH" },
      { name: "Emirates", code: "EK" },
    ],
    transportTypes: ["Coach", "Rail transfer", "Sedan"],
    activities: [
      "Jungfraujoch cogwheel railway ascent",
      "Lake Lucerne panoramic cruise",
      "Mount Titlis cable car and glacier walk",
      "Old Town heritage walk with local guide",
      "Glacier Express scenic rail leg",
      "Matterhorn viewpoint at Gornergrat",
      "Chocolate and cheese workshop",
      "Leisure day in Interlaken",
    ],
    dial: "+41 79",
    drivers: ["Marco Keller", "Luca Brunner", "Stefan Frei"],
    tours: [
      "Swiss Alpine Escape",
      "Switzerland Grand Rail Journey",
      "Jungfrau & Lakes Comfort",
      "Swiss Winter Wonders",
    ],
    bestTime: "May–Sep",
    travelStyle: "Scenic",
  },
  {
    name: "Austria",
    country: "Austria",
    region: "Europe",
    scope: "International",
    airport: "VIE",
    airportName: "Vienna International",
    gatewayCity: "Vienna",
    cities: ["Vienna", "Salzburg", "Innsbruck", "Hallstatt"],
    hotels: [
      { name: "Hotel Sacher Wien", city: "Vienna", rating: 5 },
      { name: "Hotel Goldener Hirsch", city: "Salzburg", rating: 5 },
      { name: "Grand Hotel Europa", city: "Innsbruck", rating: 4 },
      { name: "Seehotel Grüner Baum", city: "Hallstatt", rating: 4 },
    ],
    airlines: [
      { name: "Austrian Airlines", code: "OS" },
      { name: "Lufthansa", code: "LH" },
      { name: "Emirates", code: "EK" },
    ],
    transportTypes: ["Coach", "Rail transfer", "Sedan"],
    activities: [
      "Schönbrunn Palace guided tour",
      "Mozart heritage walk in Salzburg",
      "Hallstatt lakeside village visit",
      "Classical concert evening",
      "Nordkette cable car in Innsbruck",
      "Salzkammergut lakes drive",
      "Viennese coffee house experience",
      "Leisure day in Vienna",
    ],
    dial: "+43 664",
    drivers: ["Andreas Gruber", "Josef Huber", "Thomas Wagner"],
    tours: ["Austria Lakes & Music", "Imperial Vienna & Salzburg", "Tyrol Mountain Retreat"],
    bestTime: "Apr–Oct",
    travelStyle: "Cultural",
  },
  {
    name: "Japan",
    country: "Japan",
    region: "Asia",
    scope: "International",
    airport: "NRT",
    airportName: "Tokyo Narita",
    gatewayCity: "Tokyo",
    cities: ["Tokyo", "Hakone", "Kyoto", "Nara", "Osaka"],
    hotels: [
      { name: "Hotel Gracery Shinjuku", city: "Tokyo", rating: 4 },
      { name: "Hakone Yumoto Ryokan", city: "Hakone", rating: 4 },
      { name: "Sakura Garden Hotel", city: "Kyoto", rating: 4 },
      { name: "Nara Hotel", city: "Nara", rating: 5 },
      { name: "Osaka Riverside Hotel", city: "Osaka", rating: 4 },
    ],
    airlines: [
      { name: "All Nippon Airways", code: "NH" },
      { name: "Japan Airlines", code: "JL" },
      { name: "Singapore Airlines", code: "SQ" },
    ],
    transportTypes: ["Coach", "Rail transfer", "Minibus"],
    activities: [
      "Senso-ji temple and Asakusa walk",
      "Shinkansen bullet train transfer",
      "Fushimi Inari shrine early visit",
      "Arashiyama bamboo grove stroll",
      "Nara deer park and Todai-ji",
      "Mount Fuji viewpoint at Lake Ashi",
      "Tea ceremony with a Kyoto host",
      "Dotonbori evening food walk",
    ],
    dial: "+81 90",
    drivers: ["Kenji Sato", "Hiroshi Tanaka", "Yuki Nakamura"],
    tours: ["Japan Cherry Blossom Trail", "Classic Japan: Tokyo to Kyoto", "Japan Autumn Colours"],
    bestTime: "Mar–May",
    travelStyle: "Cultural",
  },
  {
    name: "Vietnam",
    country: "Vietnam",
    region: "Asia",
    scope: "International",
    airport: "HAN",
    airportName: "Hanoi Noi Bai",
    gatewayCity: "Hanoi",
    cities: ["Hanoi", "Halong Bay", "Hue", "Hoi An", "Ho Chi Minh City"],
    hotels: [
      { name: "Sofitel Legend Metropole", city: "Hanoi", rating: 5 },
      { name: "Halong Bay Cruise Suites", city: "Halong Bay", rating: 4 },
      { name: "Azerai La Residence", city: "Hue", rating: 5 },
      { name: "Anantara Hoi An Resort", city: "Hoi An", rating: 5 },
      { name: "Hotel Majestic Saigon", city: "Ho Chi Minh City", rating: 4 },
    ],
    airlines: [
      { name: "Vietnam Airlines", code: "VN" },
      { name: "Singapore Airlines", code: "SQ" },
      { name: "Thai Airways", code: "TG" },
    ],
    transportTypes: ["Coach", "Minibus", "Boat transfer"],
    activities: [
      "Hanoi Old Quarter cyclo tour",
      "Overnight Halong Bay cruise",
      "Imperial Citadel of Hue",
      "Hoi An lantern-lit evening walk",
      "Mekong Delta sampan excursion",
      "Vietnamese cooking class",
      "Cu Chi tunnels half-day",
      "Leisure day in Hoi An",
    ],
    dial: "+84 90",
    drivers: ["Nguyen Van Minh", "Tran Quoc Bao", "Le Thanh Hai"],
    tours: ["Vietnam Heritage Trail", "Halong Bay & Hanoi Discovery", "Vietnam South to North"],
    bestTime: "Oct–Apr",
    travelStyle: "Cultural",
  },
  {
    name: "Kerala",
    country: "India",
    region: "South India",
    scope: "Domestic",
    airport: "COK",
    airportName: "Cochin International",
    gatewayCity: "Kochi",
    cities: ["Kochi", "Munnar", "Thekkady", "Alleppey", "Kovalam"],
    hotels: [
      { name: "Brunton Boatyard", city: "Kochi", rating: 5 },
      { name: "Windermere Estate", city: "Munnar", rating: 4 },
      { name: "Spice Village Thekkady", city: "Thekkady", rating: 4 },
      { name: "Punnamada Resort", city: "Alleppey", rating: 4 },
      { name: "The Leela Kovalam", city: "Kovalam", rating: 5 },
    ],
    airlines: [
      { name: "IndiGo", code: "6E" },
      { name: "Air India", code: "AI" },
      { name: "Vistara", code: "UK" },
    ],
    transportTypes: ["Coach", "SUV", "Boat transfer"],
    activities: [
      "Fort Kochi heritage walk",
      "Chinese fishing nets at sunset",
      "Munnar tea plantation visit",
      "Periyar wildlife boat safari",
      "Backwater houseboat cruise",
      "Kathakali performance evening",
      "Ayurvedic wellness session",
      "Leisure day at Kovalam beach",
    ],
    dial: "+91 94",
    drivers: ["Suresh Nair", "Biju Thomas", "Anoop Menon"],
    tours: ["Kerala Backwaters Retreat", "Munnar Tea Country Escape", "Kerala Ayurveda Wellness"],
    bestTime: "Sep–Mar",
    travelStyle: "Relaxed",
  },
  {
    name: "Ladakh",
    country: "India",
    region: "North India",
    scope: "Domestic",
    airport: "IXL",
    airportName: "Kushok Bakula Rimpochee",
    gatewayCity: "Leh",
    cities: ["Leh", "Nubra Valley", "Pangong", "Alchi"],
    hotels: [
      { name: "The Grand Dragon Ladakh", city: "Leh", rating: 4 },
      { name: "Nubra Ecolodge", city: "Nubra Valley", rating: 3 },
      { name: "Pangong Retreat Camp", city: "Pangong", rating: 3 },
      { name: "Alchi Heritage Home", city: "Alchi", rating: 3 },
    ],
    airlines: [
      { name: "IndiGo", code: "6E" },
      { name: "Air India", code: "AI" },
      { name: "SpiceJet", code: "SG" },
    ],
    transportTypes: ["SUV", "Minibus", "Coach"],
    activities: [
      "Acclimatisation day in Leh",
      "Thiksey and Hemis monastery visit",
      "Khardung La high pass crossing",
      "Nubra Valley sand dunes",
      "Pangong Tso lakeside morning",
      "Alchi Choskor murals walk",
      "Indus and Zanskar confluence",
      "Leh market and Shanti Stupa",
    ],
    dial: "+91 94",
    drivers: ["Tsering Angchuk", "Stanzin Dorje", "Rigzin Namgyal"],
    tours: ["Ladakh High Passes", "Leh, Nubra & Pangong", "Ladakh Monastery Trail"],
    bestTime: "Jun–Sep",
    travelStyle: "Adventure",
  },
  {
    name: "Iceland",
    country: "Iceland",
    region: "Europe",
    scope: "International",
    airport: "KEF",
    airportName: "Keflavík International",
    gatewayCity: "Reykjavik",
    cities: ["Reykjavik", "Vik", "Höfn", "Akureyri"],
    hotels: [
      { name: "Reykjavik Konsulat Hotel", city: "Reykjavik", rating: 4 },
      { name: "Hotel Vík í Mýrdal", city: "Vik", rating: 4 },
      { name: "Fosshotel Glacier Lagoon", city: "Höfn", rating: 4 },
      { name: "Northern Light Inn", city: "Akureyri", rating: 3 },
    ],
    airlines: [
      { name: "Icelandair", code: "FI" },
      { name: "Lufthansa", code: "LH" },
      { name: "Emirates", code: "EK" },
    ],
    transportTypes: ["Coach", "Minibus", "4x4 Safari Vehicle"],
    activities: [
      "Golden Circle: Þingvellir, Geysir, Gullfoss",
      "Northern lights hunt with local guide",
      "Reynisfjara black sand beach",
      "Jökulsárlón glacier lagoon cruise",
      "Blue Lagoon geothermal spa",
      "Skógafoss and Seljalandsfoss waterfalls",
      "Whale watching from Akureyri",
      "Reykjavik city and harbour walk",
    ],
    dial: "+354 8",
    drivers: ["Jón Sigurðsson", "Bjarni Ólafsson", "Einar Magnússon"],
    tours: ["Iceland Northern Lights", "Ring Road Highlights", "Iceland Glaciers & Waterfalls"],
    bestTime: "Sep–Mar",
    travelStyle: "Adventure",
  },
  {
    name: "Kenya",
    country: "Kenya",
    region: "Africa",
    scope: "International",
    airport: "NBO",
    airportName: "Jomo Kenyatta International",
    gatewayCity: "Nairobi",
    cities: ["Nairobi", "Maasai Mara", "Lake Nakuru", "Amboseli"],
    hotels: [
      { name: "Hemingways Nairobi", city: "Nairobi", rating: 5 },
      { name: "Mara Serena Safari Lodge", city: "Maasai Mara", rating: 4 },
      { name: "Lake Nakuru Sopa Lodge", city: "Lake Nakuru", rating: 4 },
      { name: "Ol Tukai Lodge", city: "Amboseli", rating: 4 },
    ],
    airlines: [
      { name: "Kenya Airways", code: "KQ" },
      { name: "Emirates", code: "EK" },
      { name: "Qatar Airways", code: "QR" },
    ],
    transportTypes: ["4x4 Safari Vehicle", "Minibus"],
    activities: [
      "Nairobi Giraffe Centre visit",
      "Maasai Mara morning game drive",
      "Big Five full-day safari",
      "Maasai village cultural visit",
      "Lake Nakuru flamingo viewing",
      "Amboseli with Kilimanjaro views",
      "Sundowner on the savannah",
      "Bush breakfast in the Mara",
    ],
    dial: "+254 7",
    drivers: ["Joseph Kimani", "Daniel Otieno", "Peter Mwangi"],
    tours: ["Kenya Safari Classic", "Maasai Mara Migration", "Kenya Big Five Expedition"],
    bestTime: "Jul–Oct",
    travelStyle: "Adventure",
  },
  {
    name: "Bhutan",
    country: "Bhutan",
    region: "Asia",
    scope: "International",
    airport: "PBH",
    airportName: "Paro International",
    gatewayCity: "Paro",
    cities: ["Paro", "Thimphu", "Punakha", "Phobjikha"],
    hotels: [
      { name: "Zhiwa Ling Heritage", city: "Paro", rating: 5 },
      { name: "Taj Tashi Thimphu", city: "Thimphu", rating: 5 },
      { name: "Dhensa Boutique Resort", city: "Punakha", rating: 4 },
      { name: "Gangtey Lodge", city: "Phobjikha", rating: 4 },
    ],
    airlines: [
      { name: "Druk Air", code: "KB" },
      { name: "Bhutan Airlines", code: "B3" },
    ],
    transportTypes: ["Coach", "SUV", "Minibus"],
    activities: [
      "Tiger's Nest monastery hike",
      "Buddha Dordenma viewpoint",
      "Punakha Dzong and suspension bridge",
      "Dochula Pass with Himalayan views",
      "Phobjikha valley nature trail",
      "Traditional hot stone bath",
      "Thimphu weekend market",
      "Archery demonstration afternoon",
    ],
    dial: "+975 17",
    drivers: ["Karma Wangchuk", "Sonam Dorji", "Pema Tshering"],
    tours: ["Bhutan Mindful Journey", "Tiger's Nest & Punakha", "Bhutan Festival Journey"],
    bestTime: "Mar–May",
    travelStyle: "Cultural",
  },
  {
    name: "Portugal",
    country: "Portugal",
    region: "Europe",
    scope: "International",
    airport: "LIS",
    airportName: "Lisbon Humberto Delgado",
    gatewayCity: "Lisbon",
    cities: ["Lisbon", "Sintra", "Porto", "Évora", "Algarve"],
    hotels: [
      { name: "Hotel Avenida Palace", city: "Lisbon", rating: 5 },
      { name: "Tivoli Palácio de Seteais", city: "Sintra", rating: 5 },
      { name: "Pestana Vintage Porto", city: "Porto", rating: 4 },
      { name: "Convento do Espinheiro", city: "Évora", rating: 5 },
      { name: "Vila Vita Parc", city: "Algarve", rating: 5 },
    ],
    airlines: [
      { name: "TAP Air Portugal", code: "TP" },
      { name: "Lufthansa", code: "LH" },
      { name: "Emirates", code: "EK" },
    ],
    transportTypes: ["Coach", "Sedan", "Rail transfer"],
    activities: [
      "Belém Tower and Jerónimos Monastery",
      "Alfama fado evening",
      "Pena Palace in Sintra",
      "Douro Valley wine estate lunch",
      "Porto riverside and cellar tour",
      "Évora Roman temple walk",
      "Algarve coastal boat trip",
      "Leisure day in Lisbon",
    ],
    dial: "+351 91",
    drivers: ["João Pereira", "Rui Costa", "Miguel Santos"],
    tours: ["Portugal Coastal Discovery", "Lisbon, Sintra & Porto", "Douro Valley & Algarve"],
    bestTime: "Apr–Oct",
    travelStyle: "Scenic",
  },
];

export const destinationByName = new Map(DESTINATIONS.map((d) => [d.name, d]));
