import { extractArticle } from "./Article.js";
import { extractRecipeSchema } from "./Recipe.js";
import { extractProductSchema } from "./Product.js";
import { extractCodeSnippet } from "./CodeSnippet.js";
import { extractPaper } from "./Paper.js";
import { extractEventListing } from "./EventListing.js";
const NAMED_SCHEMAS = [
  "Article",
  "Recipe",
  "Product",
  "CodeSnippet",
  "Paper",
  "EventListing"
];
function isNamedSchemaType(s) {
  return NAMED_SCHEMAS.includes(s);
}
async function extractNamedSchema(schema, html, url) {
  switch (schema) {
    case "Article":
      return extractArticle(html, url);
    case "Recipe":
      return extractRecipeSchema(html, url);
    case "Product":
      return extractProductSchema(html, url);
    case "CodeSnippet":
      return extractCodeSnippet(html, url);
    case "Paper":
      return extractPaper(html, url);
    case "EventListing":
      return extractEventListing(html, url);
    default: {
      const _exhaustive = schema;
      void _exhaustive;
      return null;
    }
  }
}
export {
  NAMED_SCHEMAS,
  extractNamedSchema,
  isNamedSchemaType
};
//# sourceMappingURL=index.js.map