interface ProjectStructuredData {
  name: string;
  description: string;
  image?: string;
  datePublished: string;
  dateModified: string;
}

interface BoldProductStructuredData {
  name: string;
  description: string;
  image: string;
  url: string;
}

interface ServiceStructuredData {
  name: string;
  description: string;
  image?: string;
}

export const generateStructuredData = {
  project: (data: ProjectStructuredData) => ({
    "@context": "https://schema.org",
    "@type": "Project",
    name: data.name,
    description: data.description,
    ...(data.image && { image: data.image }),
    datePublished: data.datePublished,
    dateModified: data.dateModified,
  }),

  boldProduct: (data: BoldProductStructuredData) => ({
    "@context": "https://schema.org",
    "@type": "Product",
    name: data.name,
    description: data.description,
    image: data.image,
    url: data.url,
  }),

  service: (data: ServiceStructuredData) => ({
    "@context": "https://schema.org",
    "@type": "Service",
    name: data.name,
    description: data.description,
    ...(data.image && { image: data.image }),
  }),

  organization: () => ({
    "@context": "https://schema.org",
    "@type": "Organization",
    name: "Nitescape",
    url: "https://nitescape.com",
    logo: "https://nitescape.com/logo.png",
    sameAs: [
      "https://twitter.com/nitescape",
      "https://linkedin.com/company/nitescape",
      "https://facebook.com/nitescape",
    ],
  }),
};
