import { JsonLd } from './JsonLd';
import { generateOrganizationSchema, generateWebSiteSchema } from '@/lib/seo/schema/organizationSchema';
import { Locale } from '@/lib/seo/keywords/types';

interface OrganizationSchemaProps {
  baseUrl: string;
  locale: Locale;
  logoUrl: string;
  socialProfiles?: string[];
  email?: string;
}

/**
 * Organization schema component
 * Renders Organization + WebSite JSON-LD schemas
 * 
 * @param baseUrl - Site base URL
 * @param locale - Current locale
 * @param logoUrl - URL to organization logo
 * @param socialProfiles - Array of social media profile URLs
 * @param email - Contact email
 */
export function OrganizationSchema({
  baseUrl,
  locale,
  logoUrl,
  socialProfiles,
  email,
}: OrganizationSchemaProps) {
  const orgSchema = generateOrganizationSchema(baseUrl, locale, {
    logoUrl,
    socialProfiles,
    email,
  });

  const websiteSchema = generateWebSiteSchema(baseUrl, locale);

  return <JsonLd data={[orgSchema, websiteSchema]} />;
}

export default OrganizationSchema;
