/**
 * ===========================================
 * DATOS DEL EVENTO — ZoukLambadaBCN
 * ===========================================
 * 
 * Este archivo centraliza datos "no traducibles" del evento:
 * fechas, URLs, embeds, imágenes y arrays estructurados.
 *
 * El texto visible (títulos, descripciones, labels) vive en:
 * `src/locales/*.json` y se consume vía i18n.
 * 
 * NOTA: Las imágenes deben colocarse en src/assets/ e importarse.
 */
import arielyasmin from "@/assets/staff/arielyasmin.jpg";
import hilaleo from "@/assets/staff/hilaleo.jpg";
import matheuslydia from "@/assets/staff/matheuslydia.jpg";
import omeradva from "@/assets/staff/omeradva.jpg";
import pablolena from "@/assets/staff/pablolena.jpg";
import djbiel from "@/assets/staff/djbiel.jpg";
import djwinx from "@/assets/staff/djwinx.jpg";
import djklebynho from "@/assets/staff/djklebynho.jpg";
import letialex from "@/assets/staff/letialex.jpg";
import djcathie from "@/assets/staff/djcathie.jpg";
import milu from "@/assets/staff/milu.jpg";
import safira from "@/assets/staff/safira.jpg";
import brazromi from "@/assets/staff/braz_romi.jpg";
import emanoel from "@/assets/staff/emanoel.jpg";
import didipatri from "@/assets/staff/didipatri.jpg";
import djhique from "@/assets/staff/djhique.jpg";

import gal1 from "@/assets/gallery/gal1.jpg";
import gal2 from "@/assets/gallery/gal2.jpg";
import gal3 from "@/assets/gallery/gal3.jpg";
import gal4 from "@/assets/gallery/gal4.jpg";
import gal5 from "@/assets/gallery/gal5.jpg";
import gal6 from "@/assets/gallery/gal6.jpg";


// ---- INFORMACIÓN GENERAL DEL EVENTO ----
export const EVENT_INFO = {
  /** Fecha del evento — formato ISO para el countdown */
  date: "2026-09-04T12:00:00",
  venue: "Hotel Don Angel",
  venueAddress: "Carrer del Pla de la Torre, 14, 08398 Santa Susanna, Barcelona, Spain",
  /** Google Maps embed URL — reemplazar con la URL real */
  mapEmbedUrl: "https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2982.0132199519758!2d2.718142676474322!3d41.63384568067116!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x12bb3e942c5ac469%3A0x9153afdd8d15d0c1!2sHotel%20Don%20Angel!5e0!3m2!1ses!2sus!4v1777971058774!5m2!1ses!2sus",
};




// ---- WEBHOOK N8N ----
/**
 * CONFIGURACIÓN DEL WEBHOOK:
 * 
 * 1. En n8n, crea un nuevo workflow con un nodo "Webhook"
 * 2. Configura el webhook como POST
 * 3. Copia la URL generada y pégala aquí abajo
 * 4. En n8n, conecta el webhook a tu destino (Google Sheets, Airtable, etc.)
 * 
 * Ejemplo de payload que se envía:
 * {
 *   "name": "Juan García",
 *   "email": "juan@example.com",
 *   "seats": "2",
 *   "country": "España",
 *   "comment": "Primera vez en el festival"
 * }
 */
export const WEBHOOK_URL = "https://n8n.hacecalor.net/webhook/event-reservation";
/**
 * CLAVE DE AUTENTICACIÓN:
 * 
 * Si activas "Header Auth" en n8n, asegúrate de que el nombre del header 
 * sea "X-Webhook-Secret" y que este valor coincida con el que pongas allí.
 */
export const WEBHOOK_SECRET = "oWkS4cAgj0LVgIbnO3cGKTePPLnRAIAa5NTvXahx5z0=";

export const ABOUT_ORG = {
  socials: {
    instagram: "https://instagram.com/zouklambadabcn",
    facebook: "https://facebook.com/zouklambadabcn",
    youtube: "https://youtube.com/@zouklambadabcn",
  },
};

// ---- STAFF DEL EVENTO ----
/** 
 * Para añadir un nuevo miembro del staff, 
 * simplemente agrega un nuevo objeto al array.
 */
export const STAFF = [
  {
    id: "1",
    name: "Pablo & Lena",
    role: "Teacher" as const,
    /** Reemplazar con ruta a foto real */
    image: pablolena,
  },
  {
    id: "2",
    name: "Ariel & Yasmin",
    role: "Teacher" as const,
    image: arielyasmin,
  },
  {
    id: "3",
    name: "Hila & Leo",
    role: "Teacher" as const,
    image: hilaleo,
  },
  {
    id: "4",
    name: "Matheus & Lydia",
    role: "Teacher" as const,
    image: matheuslydia,
  },
  {
    id: "5",
    name: "Omer & Adva",
    role: "Teacher" as const,
    image: omeradva,
  },
  {
    id: "6",
    name: "DJ Biel",
    role: "DJ" as const,
    image: djbiel,
  },
  {
    id: "7",
    name: "DJ WinX",
    role: "DJ" as const,
    image: djwinx,
  },
  {
    id: "8",
    name: "DJ Klebynho",
    role: "DJ" as const,
    image: djklebynho,
  },
  {
    id: "9",
    name: "Leticia & Alex",
    role: "Teacher" as const,
    image: letialex,
  },
  {
    id: "10",
    name: "DJ Cathie",
    role: "DJ" as const,
    image: djcathie,
  },
  {
    id: "11",
    name: "Milu",
    role: "Teacher" as const,
    image: milu,
  },
  {
    id: "12",
    name: "Safira",
    role: "Teacher" as const,
    image: safira,
  },
  {
    id: "13",
    name: "Braz & Romina",
    role: "Teacher" as const,
    image: brazromi,
  },
  {
    id: "14",
    name: "Emanoel",
    role: "Teacher" as const,
    image: emanoel,
  },
  {
    id: "15",
    name: "Didi & Patricia",
    role: "Teacher" as const,
    image: didipatri,
  },
  { id: "16",
    name: "DJ Hique",
    role: "DJ" as const,
    image: djhique,
  },
];

// ---- PROGRAMA DEL EVENTO ----
export const SCHEDULE = [
  {
    day: "Viernes 20 Junio",
    events: [
      { time: "18:00 – 19:30", title: "[Workshop 1]", type: "workshop" as const },
      { time: "19:30 – 20:00", title: "Pausa", type: "break" as const },
      { time: "20:00 – 21:30", title: "[Workshop 2]", type: "workshop" as const },
      { time: "22:00 – 03:00", title: "Social Dance + DJ Set", type: "social" as const },
    ],
  },
  {
    day: "Sábado 21 Junio",
    events: [
      { time: "12:00 – 13:30", title: "[Workshop 3]", type: "workshop" as const },
      { time: "14:00 – 15:30", title: "[Workshop 4]", type: "workshop" as const },
      { time: "16:00 – 17:30", title: "[Workshop 5]", type: "workshop" as const },
      { time: "21:00 – 22:00", title: "Shows en Vivo", type: "show" as const },
      { time: "22:00 – 04:00", title: "Social Dance + DJ Sets", type: "social" as const },
    ],
  },
  {
    day: "Domingo 22 Junio",
    events: [
      { time: "12:00 – 13:30", title: "[Workshop 6]", type: "workshop" as const },
      { time: "14:00 – 15:30", title: "[Workshop 7]", type: "workshop" as const },
      { time: "17:00 – 22:00", title: "Farewell Party", type: "social" as const },
    ],
  },
];

// ---- HABITACIONES DE HOTEL ----
/**
 * Para añadir habitaciones, agrega objetos al array.
 * El botón "Reservar" abre el link en nueva pestaña.
 */
export const HOTEL_ROOMS = [
  {
    id: "1",
    name: "[Habitación Individual]",
    price: "[XX€/noche]",
    description: "[Descripción breve de la habitación]",
    /** Reemplazar con URL de imagen real */
    image: "",
    link: "https://hotel-example.com/booking",
  },
  {
    id: "2",
    name: "[Habitación Doble]",
    price: "[XX€/noche]",
    description: "[Descripción breve de la habitación]",
    image: "",
    link: "https://hotel-example.com/booking",
  },
  {
    id: "3",
    name: "[Suite]",
    price: "[XX€/noche]",
    description: "[Descripción breve de la habitación]",
    image: "",
    link: "https://hotel-example.com/booking",
  },
];

// ---- INFORMACIÓN PRÁCTICA ----
export const PRACTICAL_INFO = {
  airports: [
    { name: "Aeropuerto de Barcelona-El Prat (BCN)", distance: "~85 km del Hotel" },
    { name: "Aeropuerto de Girona (GRO)", distance: "~48 km del Hotel" },
  ],
  howToGet: [
    { method: "Metro", details: "Línea y parada más cercana", link: "https://maps.app.goo.gl/YVyASwX2odX1mW5J6" },
    { method: "Taxi/Uber", details: "Disponible desde cualquier punto de Barcelona" },
  ],
};

// ---- GALERÍA ----
/**
 * Añade URLs o importaciones de imágenes.
 * Para importar: import img from "@/assets/gallery/photo1.jpg"
 */
export const GALLERY_IMAGES = [
  { src: gal1, alt: "[Descripción foto 1]" },
  { src: gal2, alt: "[Descripción foto 2]" },
  { src: gal3, alt: "[Descripción foto 3]" },
  { src: gal4, alt: "[Descripción foto 4]" },
  { src: gal5, alt: "[Descripción foto 5]" },
  { src: gal6, alt: "[Descripción foto 6]" },
];

// ---- PAQUETES MIXTOS (Room + Pass) ----
export type RoomType = "individual" | "double" | "suite";
export type PassType = "full" | "party";

export const ROOM_TYPES: { id: RoomType }[] = [
  { id: "individual" },
  { id: "double" },
  { id: "suite" },
];

// ---- PRECIOS DINÁMICOS FULL PASS ----
/**
 * Calcula el precio del Full Pass según la fecha actual.
 * - Hasta 1 de junio: 170€
 * - 1 de junio - 1 de septiembre: 190€
 * - Después del inicio del evento: 200€ (último precio)
 */
export function getFullPassPrice(): { price: number; isLastPrice: boolean; validUntilKey: string | null } {
  const now = new Date();
  const julyFirst = new Date("2026-07-15T00:00:00");
  const septemberFirst = new Date("2026-09-01T00:00:00");
  const eventStart = new Date(EVENT_INFO.date);

  if (now < julyFirst) {
    return { price: 170, isLastPrice: false, validUntilKey: "validUntilJuly" };
  } else if (now < septemberFirst) {
    return { price: 190, isLastPrice: false, validUntilKey: "validUntilSeptember" };
  } else {
    // After event starts
    return { price: 200, isLastPrice: true, validUntilKey: null };
  }
}

export const MIXED_BOOKING_PACKAGES = [
  { id: "full" as PassType, label: "full", roomPrices: { individual: 100, double: 150, suite: 213 } },
  { id: "party" as PassType, label: "party", roomPrices: { individual: 100, double: 150, suite: 213 } },
];

// ---- SECCIONES VISIBLES ----
export const SECTIONS = {
  about: true,
  org: true,
  staff: true,
  profesores: true,
  schedule: true,
  booking: false,
  mixed_booking: true,
  hotel: false,
  practical: true,
  gallery: true,
};

// ---- NAVEGACIÓN ----
const HREF_TO_SECTION: Record<string, keyof typeof SECTIONS> = {
  "#about": "about",
  "#staff": "staff",
  "#schedule": "schedule",
  "#booking": "booking",
  "#mixed-booking": "mixed_booking",
  "#hotel": "hotel",
  "#info": "practical",
  "#gallery": "gallery",
};

export const NAV_LINKS = (
  [
    { href: "#about" },
    { href: "#staff" },
    { href: "#schedule" },
    { href: "#booking" },
    { href: "#mixed-booking" },
    { href: "#hotel" },
    { href: "#info" },
    { href: "#gallery" },
  ] as const
).filter((link) => SECTIONS[HREF_TO_SECTION[link.href]]);
