import { z as isObject, A as baseMerge, B as createAssigner, C as baseRest, E as apply, S as StringEnum, F as image, G as boolean, H as getSchemaDefaults } from "./use-page-data.BgY0vKG4.js";
import { Type } from "@sinclair/typebox";
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  if (isObject(objValue) && isObject(srcValue)) {
    stack.set(srcValue, objValue);
    baseMerge(objValue, srcValue, void 0, customDefaultsMerge, stack);
    stack["delete"](srcValue);
  }
  return objValue;
}
var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  baseMerge(object, source, srcIndex, customizer);
});
var defaultsDeep = baseRest(function(args) {
  args.push(void 0, customDefaultsMerge);
  return apply(mergeWith, void 0, args);
});
const pageAttributesSchema = Type.Object({
  tags: Type.Array(Type.String({ description: "A tag for the page. Should be url-safe." }), {
    title: "Tags",
    description: "Use tags to organize, group and filter pages in navigation elements and in the dashboard. By default, the navbar element display pages having the 'navbar' tag, while the sidebar displays the pages with the tag 'sidebar'.",
    "ui:field": "tags",
    examples: [
      ["navbar", "important"],
      ["navbar", "sidebar"],
      ["sidebar"],
      ["campaign-landing-20250610"]
    ],
    maxItems: 8,
    default: []
  }),
  path: Type.String({
    title: "URL path",
    default: "/",
    description: "The URL path of the page. Use placeholders like :id or :slug for dynamic paths.",
    "ai:instructions": "Never put language codes in the path.",
    "ui:field": "path",
    pattern: "^/[a-z0-9-:/]*$",
    examples: [
      "/",
      "/about",
      "/products/:id"
    ]
  }),
  layout: Type.String({
    title: "Layout",
    description: "The layout to use for this page. Ex: 'default', 'main', 'no-sidebar'",
    default: "default",
    "ui:field": "hidden"
  }),
  title: Type.String({
    title: "Title",
    default: "Untitled",
    "ui:group": "meta",
    "ui:group:title": "Meta tags",
    description: "The title of the page. Appears in the browser tab and search results",
    "ui:placeholder": "Page title"
  }),
  description: Type.String({
    title: "Description",
    "ui:widget": "textarea",
    "ui:group": "meta",
    "ui:group:title": "Meta tags",
    description: "A short description of the page. Used by search engines",
    "ui:multiline": true,
    "ui:textarea-class": "h-24",
    default: "",
    "ui:placeholder": "A brief description of the page"
  }),
  keywords: Type.String({
    title: "Keywords",
    "ui:group": "meta",
    "ui:group:title": "Meta tags",
    description: "Keywords related to the page. Used by search engines",
    "ui:multiline": true,
    default: "",
    "ui:placeholder": "keyword1, keyword2, keyword3"
  }),
  ogImage: Type.Optional(image({
    title: "Social share image",
    description: "Image shown when this page is shared on social media",
    "ui:group": "meta",
    "ai:hidden": true,
    "ui:no-object-options": true,
    "ui:no-alt-text": true,
    "ui:show-img-search": false,
    "ui:no-dynamic": true,
    "ui:placeholder": "https://example.com/image.jpg"
  })),
  robotsIndexing: Type.Optional(Type.Boolean({
    title: "Allow search engines to index this page",
    default: true,
    description: "Disabling this will prevent search engines from indexing this page",
    "ai:hidden": true,
    "ui:group": "meta"
  })),
  language: Type.Optional(StringEnum([
    "ar",
    "zh",
    "cs",
    "nl",
    "en",
    "fr",
    "de",
    "he",
    "hi",
    "it",
    "ja",
    "ko",
    "fa",
    "pl",
    "pt",
    "ru",
    "es",
    "tr",
    "vi"
  ], {
    "ai:hidden": true,
    "ui:group": "meta",
    title: "Language",
    default: "en",
    description: "Overrides the site language for this page. Leave blank to use the site default language.",
    enumNames: [
      "Arabic",
      "Chinese",
      "Czech",
      "Dutch",
      "English",
      "French",
      "German",
      "Hebrew",
      "Hindi",
      "Italian",
      "Japanese",
      "Korean",
      "Persian",
      "Polish",
      "Portuguese",
      "Russian",
      "Spanish",
      "Turkish",
      "Vietnamese"
    ]
  })),
  additionalTags: Type.Optional(Type.Object({
    headTags: Type.Optional(Type.String({
      title: "Head script tags",
      description: "Add custom tags to the <head> of your site. Useful for analytics tags, custom scripts, etc.",
      "ai:instructions": "Don't include meta tags here, they are automatically generated.",
      "ui:multiline": true,
      "ui:textarea-class": "h-40 !font-mono",
      "ui:placeholder": "<script src='https://example.com/script.js'><\/script>",
      "ui:premium": true,
      "ui:textarea-font-size": "1",
      "ui:no-dynamic": true
    })),
    bodyTags: Type.Optional(Type.String({
      title: "Body script tags",
      description: "Add custom tags to the <body> of your site. Useful for analytics tags, custom scripts, etc.",
      "ui:multiline": true,
      "ui:premium": true,
      "ui:textarea-class": "h-40 !font-mono",
      "ui:textarea-font-size": "1",
      "ui:placeholder": "<script src='https://example.com/script.js'><\/script>",
      "ui:no-dynamic": true
    }))
  }, {
    "ui:group": "meta",
    "ai:hidden": true
  })),
  isInitialPage: Type.Optional(Type.Boolean({
    title: "Is this the initial page created by the system?",
    "ai:hidden": true
  }))
}, {
  "ui:groups": {
    meta: "SEO & Meta tags",
    layout: "Layout"
  },
  additionalProperties: false
});
const siteAttributesSchema = Type.Object({
  themeId: Type.String({
    title: "Theme ID",
    description: "The ID of the theme to use for the site",
    default: "default-theme"
  }),
  language: StringEnum([
    "ar",
    "zh",
    "cs",
    "nl",
    "en",
    "fr",
    "de",
    "he",
    "hi",
    "it",
    "ja",
    "ko",
    "fa",
    "pl",
    "pt",
    "ru",
    "es",
    "tr",
    "vi"
  ], {
    title: "Site language",
    default: "en",
    enumNames: [
      "Arabic",
      "Chinese",
      "Czech",
      "Dutch",
      "English",
      "French",
      "German",
      "Hebrew",
      "Hindi",
      "Italian",
      "Japanese",
      "Korean",
      "Persian",
      "Polish",
      "Portuguese",
      "Russian",
      "Spanish",
      "Turkish",
      "Vietnamese"
    ],
    "ai:instructions": "Choose a value based on the site description. If the site is in multiple languages, use 'en'."
  }),
  ogImage: Type.Optional(image({
    title: "Social share image",
    description: "Image shown when this site is shared on social media",
    "ai:hidden": true,
    "ui:group": "meta",
    "ui:no-object-options": true,
    "ui:no-alt-text": true,
    "ui:show-img-search": false,
    "ui:no-dynamic": true
  })),
  robotsIndexing: Type.Optional(boolean("Allow search engines to index this site", true, {
    description: "Disabling this will prevent search engines from indexing this site entirely",
    "ai:hidden": true,
    "ui:group": "meta"
  })),
  headTags: Type.Optional(Type.String({
    title: "Head script tags",
    description: "Add custom tags to the <head> of your site. Useful for analytics tags, custom scripts, etc.",
    "ai:hidden": true,
    "ui:multiline": true,
    "ui:textarea-class": "h-40 !font-mono",
    "ui:placeholder": "<script src='https://example.com/script.js'><\/script>",
    "ui:premium": true,
    "ui:textarea-font-size": "1",
    "ui:group": "external",
    "ui:no-dynamic": true
  })),
  bodyTags: Type.Optional(Type.String({
    title: "Body script tags",
    description: "Add custom tags to the <body> of your site. Useful for analytics tags, custom scripts, etc.",
    "ai:hidden": true,
    "ui:multiline": true,
    "ui:premium": true,
    "ui:textarea-class": "h-40 !font-mono",
    "ui:textarea-font-size": "1",
    "ui:placeholder": "<script src='https://example.com/script.js'><\/script>",
    "ui:group": "external",
    "ui:no-dynamic": true
  }))
}, { "ui:groups": {
  meta: "SEO & Meta tags",
  layout: "Layout",
  navbar: "Navbar",
  footer: "Footer",
  external: "External scripts"
} });
function resolvePageAttributes(data = {}) {
  return defaultsDeep({}, getSchemaDefaults(pageAttributesSchema), data);
}
export {
  pageAttributesSchema as p,
  resolvePageAttributes as r,
  siteAttributesSchema as s
};
//# sourceMappingURL=attributes.DoNucG4y.js.map
