export interface PersonData {
  id: string;
  photo: string;
  name: string;
  surname: string;
  role: string;
  location: string;
  href: string;
}

export interface FilterOptions {
  locations: string[];
  roles: string[];
}


export interface EquipmentItem {
  id: string;
  name: string;
  image: string;
  href: string;
}

export interface StudioPageData {
  meta: {
    title: string;
    description: string;
  };
  hero: {
    studioType: string;
    location: string;
    country: string;
    address: string;
    description: string;
    images: Array<{
      id: string;
      src: string;
      alt: string;
      title: string;
      description: string;
    }>;
  };
  crew: {
    title: string;
    people: PersonData[];
    filterOptions: FilterOptions;
  };
  equipment: {
    title: string;
    items: EquipmentItem[];
  };
  planVisit: {
    address: string;
    hours: string;
    phone: string;
    email: string;
    additionalInfo: string;
  };
}

export const peopleData: PersonData[] = [];

export const filterOptions: FilterOptions = {
  locations: [],
  roles: [],
};

export const studioImages = [
  {
    id: "1",
    src: "/images/studios/studio-1.png",
    alt: "Studio main view",
    title: "Main Studio Space",
    description: "Professional setup with state-of-the-art equipment",
  },
  {
    id: "2",
    src: "/images/studios/music-1.png",
    alt: "Studio equipment view",
    title: "Recording Setup",
    description: "High-quality audio and video recording capabilities",
  },
  {
    id: "3",
    src: "/images/studios/photo-1.png",
    alt: "Studio lighting setup",
    title: "Lighting & Backdrop",
    description: "Professional lighting with customizable backdrops",
  },
  {
    id: "4",
    src: "/images/studios/studio-2.png",
    alt: "Studio workspace",
    title: "Creative Workspace",
    description: "Comfortable workspace for editing and post-production",
  },
  {
    id: "5",
    src: "/images/studios/music-2.png",
    alt: "Studio control room",
    title: "Control Room",
    description: "Advanced control room with mixing capabilities",
  },
  {
    id: "6",
    src: "/images/studios/studio-3.png",
    alt: "Studio lounge area",
    title: "Lounge Area",
    description: "Relaxation space for breaks and client meetings",
  },
];

const equipmentItems: EquipmentItem[] = [
  {
    id: "dj-equipment",
    name: "DJ EQUIPMENT",
    image: "/images/equipment/dj-equipment.png",
    href: "/equipment/dj-equipment",
  },
  {
    id: "cameras",
    name: "CAMERAS",
    image: "/images/equipment/cameras.png",
    href: "/equipment/cameras",
  },
  {
    id: "light",
    name: "LIGHT",
    image: "/images/equipment/light.png",
    href: "/equipment/light",
  },
];

const toTitleCase = (s: string): string =>
  s.split('-').map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(' ');

export function getStudioPageData(studioId: string, location: string, studioType: string): StudioPageData {
  const country = toTitleCase(location);
  const address = "";
  
  const studioImagesWithAlt = studioImages.map(image => ({
    ...image,
    alt: `${studioType} ${image.alt.split(' ').slice(1).join(' ')}`
  }));

  const description = `${location.charAt(0).toUpperCase() + location.slice(1)} is a city of innovation, culture, and creativity, and Nomadic Studios is proud to be at the heart of it. Our space here is designed to empower creators across disciplines, providing the tools, resources, and inspiration needed to take your work to the next level. Whether you're a local professional looking for a versatile studio or a traveling creator seeking a place to call your creative home, you'll find everything you need here.`;

  return {
    meta: {
      title: `Book ${studioType} Studio | Nomadic`,
      description: `Book your ${studioType.toLowerCase()} studio session at Nomadic`,
    },
    hero: {
      studioType,
      location,
      country,
      address,
      description,
      images: studioImagesWithAlt,
    },
    crew: {
      title: "OUR CREW",
      people: peopleData,
      filterOptions,
    },
    equipment: {
      title: "EQUIPMENT",
      items: equipmentItems,
    },
    planVisit: {
      address: "",
      hours: "",
      phone: "",
      email: "",
      additionalInfo: "",
    },
  };
}

export const planVisitData = {
  address: "",
  hours: "",
  phone: "",
  email: "",
  additionalInfo: "",
};