export type Locale = "en" | "id";

export type LocalizedText = {
  en: string;
  id: string;
};

export type LocalizedList = {
  en: string[];
  id: string[];
};

export type LocalizedFaq = {
  question: LocalizedText;
  answer: LocalizedText;
};

export type ImageAsset = string | { url: string; alt?: string };

export type FileAsset = {
  url: string;
  originalFilename?: string;
};

export type HomepageHeroSlide = {
  _key?: string;
  eyebrow: LocalizedText;
  title: LocalizedText;
  body?: LocalizedText;
  primaryLabel?: LocalizedText;
  primaryHref?: string;
  mediaType?: "image" | "video";
  image?: ImageAsset;
  video?: FileAsset;
};

export type HomepageShowcaseSettings = {
  eyebrow?: LocalizedText;
};

export type HomepageMetric = {
  _key?: string;
  title: LocalizedText;
  description: LocalizedText;
};

export type HomepageOverviewSettings = {
  eyebrow?: LocalizedText;
  title?: LocalizedText;
  body?: LocalizedText;
  metrics?: HomepageMetric[];
};

export type ProductCategory = {
  _key?: string;
  title: LocalizedText;
  description?: LocalizedText;
  image?: ImageAsset;
  href?: string;
};

export type Product = SeoFields & {
  title: LocalizedText;
  icon?: string;
  slug: string;
  category?: LocalizedText;
  shortDescription: LocalizedText;
  fullDescription: LocalizedText;
  heroImage?: ImageAsset;
  detailHeroVideo?: FileAsset;
  detailHeroImages?: ImageAsset[];
  keyFeatures?: LocalizedList;
  suitableFor?: LocalizedList;
  benefits?: LocalizedList;
  relatedSolutions?: string[];
  relatedCaseStudies?: string[];
  faqs?: LocalizedFaq[];
  featuredProduct?: boolean;
};

export type HomepageProductsSettings = {
  eyebrow?: LocalizedText;
  title?: LocalizedText;
  intro?: LocalizedText;
  items?: ProductCategory[];
};

export type RoomDesignerPageSettings = {
  eyebrow?: LocalizedText;
  title?: LocalizedText;
  description?: LocalizedText;
  ctaLabel?: LocalizedText;
  ctaHref?: string;
  backgroundType?: "image" | "video";
  backgroundImage?: ImageAsset;
  backgroundVideo?: FileAsset;
};

export type SeoFields = {
  seoTitle: LocalizedText;
  seoDescription: LocalizedText;
  ogImage?: ImageAsset;
};

export type Solution = SeoFields & {
  title: LocalizedText;
  slug: string;
  shortDescription: LocalizedText;
  fullDescription: LocalizedText;
  icon: string;
  eyebrow?: LocalizedText;
  heroImage?: ImageAsset;
  showcaseImage?: ImageAsset;
  detailHeroVideo?: FileAsset;
  detailHeroImages?: ImageAsset[];
  relatedCaseStudies?: string[];
  faqs?: LocalizedFaq[];
};

export type Industry = SeoFields & {
  title: LocalizedText;
  slug: string;
  shortDescription: LocalizedText;
  fullDescription: LocalizedText;
  showcaseImage?: ImageAsset;
  detailHeroVideo?: FileAsset;
  detailHeroImages?: ImageAsset[];
  relatedSolutions?: string[];
  relatedCaseStudies?: string[];
  painPoints?: LocalizedList;
  keyBenefits?: LocalizedList;
  faqs?: LocalizedFaq[];
};

export type CaseStudy = SeoFields & {
  title: LocalizedText;
  slug: string;
  clientName: string;
  industry: string;
  location: string;
  year: string;
  projectCategory: string;
  heroImage?: ImageAsset;
  galleryImages?: ImageAsset[];
  shortSummary: LocalizedText;
  challenge: LocalizedText;
  solution: LocalizedText;
  result: LocalizedText;
  background?: LocalizedText;
  process?: LocalizedText;
  benefits?: LocalizedList;
  productsOrTechnologiesUsed: string[];
  partnerBrands: string[];
  portfolioFile?: FileAsset;
  featuredProject: boolean;
  publishedAt: string;
};

export type PartnerBrand = {
  name: string;
  logo?: ImageAsset;
  website: string;
  category: string;
  description: LocalizedText;
};

export type BlogPost = SeoFields & {
  title: LocalizedText;
  slug: string;
  excerpt: LocalizedText;
  content: LocalizedText;
  coverImage?: ImageAsset;
  author: string;
  publishedAt: string;
};

export type SiteSettings = {
  siteName: string;
  siteDescription: LocalizedText;
  companyProfileFile?: FileAsset;
  homepageHeroSlides?: HomepageHeroSlide[];
  homepageOverview?: HomepageOverviewSettings;
  homepageShowcase?: HomepageShowcaseSettings;
  homepageProducts?: HomepageProductsSettings;
  roomDesignerPage?: RoomDesignerPageSettings;
  contactEmail: string;
  phoneNumber: string;
  whatsappNumber: string;
  website: string;
  socialHandle: string;
  headOfficeAddress: string;
  studioAddress: string;
  defaultSeoTitle: LocalizedText;
  defaultSeoDescription: LocalizedText;
};
