import { useMemo as s } from "react";
import { a as r } from "../../../../sdk/dist/shared/chunk-46YDGGFF.js";
import "../../../../sdk/dist/shared/chunk-F4JNKU7J.js";
import "@sinclair/typebox";
import "../../../../sdk/dist/shared/chunk-7UBMXMNJ.js";
import "../../../../sdk/dist/shared/chunk-JRCVYDCD.js";
import i from "../utils/fonts.json.js";
import { useTheme as m } from "../../../../../use-page-data.js";
function p(e) {
  return e.type === "stack" ? r.find((t) => t.value === e.family)?.label ?? e.family : e.family;
}
function d(e) {
  const t = s(
    () => i.map((o) => ({ value: { type: "google", family: o }, label: o })),
    []
  ), n = m(), a = r.map((o) => ({
    value: { type: "stack", family: o.value },
    label: o.label
  })), l = n.typography.alternatives?.map((o) => ({
    label: p(o[e]),
    value: o[e]
  })) ?? [];
  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,
  d as useFonts
};
//# sourceMappingURL=use-fonts.js.map
