import { Type as e } from "typebox";
import "chroma-js";
import { Y as a } from "./use-page-data.BYLN5MSa.js";
import { useMemo as n } from "react";
const r = [
  {
    value: "system-ui",
    label: "System UI"
  },
  {
    value: "transitional",
    label: "Transitional"
  },
  {
    value: "old-style",
    label: "Old style"
  },
  {
    value: "humanist",
    label: "Humanist"
  },
  {
    value: "geometric-humanist",
    label: "Geometric humanist"
  },
  {
    value: "classical-humanist",
    label: "Classical humanist"
  },
  {
    value: "neo-grotesque",
    label: "Neo-grotesque"
  },
  {
    value: "monospace-slab-serif",
    label: "Monospace slab serif"
  },
  {
    value: "monospace-code",
    label: "Monospace code"
  },
  {
    value: "industrial",
    label: "Industrial"
  },
  {
    value: "rounded-sans",
    label: "Rounded sans"
  },
  {
    value: "slab-serif",
    label: "Slab serif"
  },
  {
    value: "antique",
    label: "Antique"
  },
  {
    value: "didone",
    label: "Didone"
  },
  {
    value: "handwritten",
    label: "Handwritten"
  }
], i = e.Union([
  e.Object({
    type: e.Literal("stack"),
    family: e.Enum(r.map((t) => t.value), {
      title: "Font stack",
      description: "A generic font stack",
      type: "string"
    })
  }),
  e.Object({
    type: e.Literal("theme"),
    family: e.String({
      title: "Theme font",
      description: "A font defined in the theme"
    })
  }),
  e.Object({
    type: e.Literal("google"),
    family: e.String({
      title: "Google font",
      description: "A Google font family name, as listed on fonts.google.com"
    })
  })
]), s = e.Evaluate(e.Intersect([i], {
  title: "Headings font",
  description: "Used for titles and headings"
})), o = e.Evaluate(e.Intersect([i], {
  title: "Body font",
  description: "Used for paragraphs and body text"
})), l = e.Object({
  id: e.String({
    title: "ID",
    description: "The unique identifier of the theme"
  }),
  name: e.String({
    title: "Name",
    description: "The name of the theme"
  }),
  description: e.String({
    title: "Description",
    description: "The description of the theme"
  }),
  tags: e.Array(e.String({ title: "Tag" }), {
    title: "Tags",
    description: "The tags of the theme"
  }),
  browserColorScheme: e.Enum(["light", "dark"], {
    title: "Browser scheme",
    description: "Color of browser-provided UI. Either 'light' or 'dark'",
    type: "string"
  }),
  colors: e.Object({
    primary: e.String({
      title: "Primary",
      description: "The brand's primary color.",
      "ai:instructions": "Use oklch() css notation.",
      examples: ["oklch(0.62 0.241 354.308)"]
    }),
    secondary: e.String({
      title: "Secondary",
      description: "The brand's second most used color",
      "ai:instructions": "Use oklch() css notation.",
      examples: ["oklch(0.65 0.22 185)"]
    }),
    accent: e.String({
      title: "Accent",
      description: "The brand's least used color",
      "ai:instructions": "Use oklch() css notation.",
      examples: ["oklch(0.82 0.18 85)"]
    }),
    neutral: e.String({
      title: "Neutral",
      description: "The base neutral color",
      "ai:instructions": "Use oklch() css notation.",
      examples: ["oklch(0.38 0.08 280)"]
    }),
    info: e.String({
      title: "Info",
      description: "Color used to convey information",
      "ai:instructions": "Use oklch() css notation.",
      examples: ["oklch(0.6 0.15 220)"]
    }),
    success: e.String({
      title: "Success",
      description: "Color used to convey success",
      "ai:instructions": "Use oklch() css notation.",
      examples: ["oklch(0.7 0.2 130)"]
    }),
    warning: e.String({
      title: "Warning",
      description: "Color used to convey warnings",
      "ai:instructions": "Use oklch() css notation.",
      examples: ["oklch(0.75 0.25 90)"]
    }),
    error: e.String({
      title: "Error",
      description: "Color used to convey errors",
      "ai:instructions": "Use oklch() css notation.",
      examples: ["oklch(0.6 0.3 40)"]
    }),
    base100: e.String({
      title: "Base",
      description: "Base surface color of page, used for blank backgrounds. Should be white or near-white for light color-schemes, and black or near-black for dark color-schemes.",
      "ai:instructions": "Use oklch() css notation",
      examples: ["oklch(0.99 0.008 92)"]
    }),
    base200: e.String({
      title: "Base 2",
      description: "Should be darker than base 100 but still light for light color-schemes, and lighter but still dark for dark color-schemes.",
      "ai:instructions": "Use oklch() css notation.",
      examples: ["oklch(0.97 0.01 85)"]
    }),
    base300: e.String({
      title: "Base 3",
      description: "3rd base color, should be darker than base 200 for light color-schemes, and lighter than base 200 for dark color-schemes.",
      "ai:instructions": "Use oklch() css notation.",
      examples: ["oklch(0.95 0.02 80)"]
    })
  }, {
    title: "Theme base colors",
    description: "The base colors of the theme. Each theme must declare all these colors"
  }),
  typography: e.Object({
    base: e.Number({
      title: "Base font size",
      description: "The base font size in pixels. It is safe to keep it as is.",
      "ai:instructions": "A safe value is 16."
    }),
    heading: s,
    body: o,
    alternatives: e.Array(e.Object({
      body: o,
      heading: s
    }), {
      title: "Alternative fonts",
      description: "Alternative fonts that can be suggested to the user. Takes the same shape"
    })
  })
});
e.Array(l);
function m(t) {
  return n(() => a[t], [t]);
}
export {
  r as f,
  l as t,
  m as u
};
