import { useMemo as s } from "react";
import { a as n } from "../../../../sdk/dist/shared/chunk-HHO3ONTQ.js";
import "@sinclair/typebox";
import i from "../utils/fonts.json.js";
import { useTheme as m } from "../../../../../use-page-data.js";
function p(o) {
  return o.type === "stack" ? n.find((t) => t.value === o.family)?.label ?? o.family : o.family;
}
function f(o) {
  const t = s(
    () => i.map((e) => ({ value: { type: "google", family: e }, label: e })),
    []
  ), r = m(), a = n.map((e) => ({
    value: { type: "stack", family: e.value },
    label: e.label
  })), l = r.typography.alternatives?.map((e) => ({
    label: p(e[o]),
    value: e[o]
  })) ?? [];
  return s(
    () => [
      ...l.length ? [{ group: "Suggested Fonts", options: l }] : [],
      {
        group: "Generic Fonts",
        options: a
      },
      {
        group: "Google Fonts",
        options: t
      }
    ],
    [l, a, t]
  );
}
export {
  p as getFontLabel,
  f as useFonts
};
//# sourceMappingURL=use-fonts.js.map
