import { a } from "./chunk-PIG623TZ.js";
import { b as ne } from "./chunk-PSCN3VVA.js";
import { a as m } from "./chunk-OIY3EPHO.js";
import { b as S$1 } from "./chunk-QGYZ7CG5.js";
import "./chunk-AFVJZPLS.js";
import { b as p$1 } from "./chunk-GACHLACT.js";
import { b as c$1 } from "./chunk-DHI3IBOD.js";
import { c as y } from "./chunk-CZRCW5EN.js";
import { d as f, b as u } from "./chunk-SWLUQVK7.js";
import { c } from "./chunk-OHNYCXPX.js";
import { a as i } from "./chunk-JMN3HTZU.js";
import { Type } from "@sinclair/typebox";
import { customAlphabet } from "../../../../node_modules/.pnpm/nanoid@5.1.5/node_modules/nanoid/index.browser.js";
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
var S = customAlphabet("azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN", 7);
Type.Object({ left: Type.Optional(Type.String({ title: "top", description: "The left position in css unit." })), top: Type.Optional(Type.String({ title: "top", description: "The top position in css unit." })), right: Type.Optional(Type.String({ title: "right", description: "The right position in css unit." })), bottom: Type.Optional(Type.String({ title: "bottom", description: "The bottom position in css unit." })), inset: Type.Optional(Type.String({ title: "inset", description: "The inset position in css unit." })), translateX: Type.Optional(Type.String({ title: "translateX", description: "The translateX position in css unit." })), translateY: Type.Optional(Type.String({ title: "translateY", description: "The translateY position in css unit." })), rotate: Type.Optional(Type.String({ title: "rotate", description: "The rotate position in css unit." })) });
var v = i(Object.keys(ne), { title: "Brick type" }), O = Type.Object({ id: Type.String({ title: "ID", description: "A unique identifier for the brick." }), type: v, props: Type.Any({ title: "Props", description: "The static props of the brick. The available props depends on the brick type." }), mobileProps: Type.Optional(Type.Any({ title: "Props", description: "The overriden props for mobile, merged with desktop props." })) }, { additionalProperties: true });
var w = Type.Object({ colorPreset: Type.Optional(y({ title: "Color" })), backgroundImage: Type.Optional(c$1({ title: "Background", description: "The background image of the section. Prefer to set background images on sections rather than on individual bricks." })), direction: p$1({ default: "flex-row", title: "Direction", description: "The direction of the section. Only apply to desktop. On mobile, it is always vertical.", "ui:responsive": "desktop" }), minHeight: Type.Optional(c({ title: "Min height", default: "fit-content", description: "The min height of the section", "ui:field": "hidden" })), variant: Type.Optional(i(["navbar", "footer", "sidebar"], { title: "Custom section variant", description: "Used for custom styling and layout.", enumNames: ["Navbar", "Footer", "Sidebar"], "ui:field": "hidden", "ai:hidden": true })), maxWidth: Type.Optional(a("Max width", "max-w-full", { options: [{ value: "max-w-screen-lg", title: "M", description: "Common for text-heavy content/blog posts" }, { value: "max-w-screen-xl", title: "L", description: "Usefull or some landing pages" }, { value: "max-w-screen-2xl", title: "XL", description: "Common width" }, { value: "max-w-full", title: "Full", description: "Takes the entire space" }], description: "The maximum width of the section. Desktop only", "ai:instructions": "Choose the most appropriate max width for the section. You will likely use the same max width for all sections in a page.", displayAs: "button-group", "ui:responsive": "desktop" })), justifyContent: Type.Optional(u({ default: "justify-center" })), alignItems: Type.Optional(f({ default: "items-center" })), padding: Type.Optional(c({ default: "2rem", description: "Padding inside the section.", title: "Padding", "ui:responsive": true, "ui:placeholder": "Not specified", "ui:styleId": "styles:padding" })), gap: Type.Optional(c({ title: "Gap", description: "The gap between the bricks in the section.", default: "20px", "ui:styleId": "styles:gap" })), wrap: Type.Optional(Type.Boolean({ title: "Wrap", description: "Wrap bricks if they overflow the section.", default: true, "ui:styleId": "styles:wrap" })), lastTouched: Type.Optional(Type.Number({ description: "Do not use this field. It is used internally by the editor.", "ui:field": "hidden", "ai:hidden": true })) }, { additionalProperties: false }), p = Type.Object({ id: Type.String({ description: "The unique ID of the section. Use a human readable url-safe slug", examples: ["content-section", "contact-section"] }), label: Type.Optional(Type.String({ description: "The label of the section. Used for editor purposes only.", examples: ["Content", "Contact"] })), order: Type.Number({ description: "Determines section order in the page (lower numbers appear first). 0-based" }), props: w, mobileProps: Type.Optional(Type.Partial(w, { additionalProperties: false })), bricks: Type.Array(O) }, { description: "Sections are direct children of the page that are stacked vertically." });
Type.Omit(p, ["bricks"]);
var j = S$1(p.properties.props, "desktop"), C = S$1(p.properties.mobileProps, "mobile");
function J(t, o, i2) {
  let r = (n) => ({ ...n, props: m({}, j, n.props), mobileProps: m({}, C, n.mobileProps || {}), bricks: n.bricks.map(k).filter(Boolean) }), d = t.map(r);
  return o.navbar && !i2.noNavbar && d.unshift(r({ order: -1, id: "navbar-section", label: "Navbar section", props: { variant: "navbar", direction: "flex-row" }, mobileProps: {}, bricks: [{ id: "navbar", type: "navbar", props: o.navbar }] })), o.footer && !i2.noFooter && d.push(r({ order: 1e3, id: "footer-section", label: "Footer section", props: { variant: "footer", direction: "flex-row" }, mobileProps: {}, bricks: [{ id: "footer", type: "footer", props: o.footer }] })), d;
}
function k(t) {
  let o = ne[t.type];
  return { ...t, props: m({}, o.props, { ...t.props, ...t.props.$children ? { $children: t.props.$children.map(k).filter(Boolean) } : {} }) };
}
function X(t, o = false) {
  let i2 = { ...ne[t].props, ghost: o };
  return { id: `b-${S()}`, type: t, props: i2 };
}
export {
  S as a,
  v as b,
  O as c,
  w as e,
  p as f,
  J as j,
  k,
  X as l
};
//# sourceMappingURL=chunk-GOMXZC4B.js.map
