import type { Fact } from "@fragments-sdk/core";

import { extractJsxFacts, type ExtractJsxFactsOptions } from "../../usage/jsx.js";

export function classnameFacts(
  source: string,
  filePath = "src/component.tsx",
  options?: ExtractJsxFactsOptions,
): Fact[] {
  return extractJsxFacts(source, filePath, options ?? {}).filter(
    (f) => f.kind === "classname_literal" || f.kind === "classname_dynamic",
  );
}
