'use strict';

// src/components/faq/json-ld.ts
var DEFAULT_NAME = "Frequently Asked Questions";
var DEFAULT_DESCRIPTION = "Answers to common questions.";
function baseFaqSchema(opts = {}) {
  return {
    "@context": "https://schema.org",
    "@type": "FAQPage",
    name: opts.name ?? DEFAULT_NAME,
    description: opts.description ?? DEFAULT_DESCRIPTION,
    ...opts.url ? { url: opts.url } : {}
  };
}
function buildFaqJsonLdFromFaqs(faqs, opts = {}) {
  return {
    ...baseFaqSchema(opts),
    mainEntity: faqs.map((faq) => ({
      "@type": "Question",
      name: faq.question,
      acceptedAnswer: {
        "@type": "Answer",
        text: faq.answer
      }
    }))
  };
}

exports.baseFaqSchema = baseFaqSchema;
exports.buildFaqJsonLdFromFaqs = buildFaqJsonLdFromFaqs;
//# sourceMappingURL=json-ld.cjs.map
//# sourceMappingURL=json-ld.cjs.map