import { a as f } from "./chunk-L42YBY5I.js";
import { b as l } from "./chunk-5DZIQGY2.js";
import { a as p } from "./chunk-MPBYGS6W.js";
import { b as m } from "./chunk-LEWKHCRI.js";
import "./chunk-F4JNKU7J.js";
import { b } from "./chunk-MVCVVKBY.js";
import { b as g } from "./chunk-GC5OWY2Z.js";
import { c as y } from "./chunk-Z4YKRLOX.js";
import { d as v, b as O } from "./chunk-DKNOZLA6.js";
import { c as a } from "./chunk-HSRXUIVM.js";
import { a as u } from "./chunk-SFKZAUPW.js";
import { Type as t } from "@sinclair/typebox";
import { customAlphabet as k } 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 w = k("azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN", 7);
t.Object({ left: t.Optional(t.String({ title: "top", description: "The left position in css unit." })), top: t.Optional(t.String({ title: "top", description: "The top position in css unit." })), right: t.Optional(t.String({ title: "right", description: "The right position in css unit." })), bottom: t.Optional(t.String({ title: "bottom", description: "The bottom position in css unit." })), inset: t.Optional(t.String({ title: "inset", description: "The inset position in css unit." })), translateX: t.Optional(t.String({ title: "translateX", description: "The translateX position in css unit." })), translateY: t.Optional(t.String({ title: "translateY", description: "The translateY position in css unit." })), rotate: t.Optional(t.String({ title: "rotate", description: "The rotate position in css unit." })) });
var T = u(Object.keys(l), { title: "Brick type" }), x = t.Object({ id: t.String({ title: "ID", description: "A unique identifier for the brick." }), type: T, props: t.Any({ title: "Props", description: "The static props of the brick. The available props depends on the brick type." }), mobileProps: t.Optional(t.Any({ title: "Props", description: "The overriden props for mobile, merged with desktop props." })) }, { additionalProperties: !0 }), c = t.Object({ colorPreset: t.Optional(y({ title: "Color" })), backgroundImage: t.Optional(g({ title: "Background", description: "The background image of the section. Prefer to set background images on sections rather than on individual bricks." })), direction: b({ 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: t.Optional(a({ title: "Min height", default: "fit-content", description: "The min height of the section", "ui:field": "hidden" })), variant: t.Optional(u(["navbar", "footer", "sidebar"], { title: "Custom section variant", description: "Used for custom styling and layout.", enumNames: ["Navbar", "Footer", "Sidebar"], "ui:field": "hidden", "ai:hidden": !0 })), maxWidth: t.Optional(f("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: t.Optional(O({ default: "justify-center" })), alignItems: t.Optional(v({ default: "items-center" })), padding: t.Optional(a({ default: "2rem", description: "Padding inside the section.", title: "Padding", "ui:responsive": !0, "ui:placeholder": "Not specified", "ui:styleId": "styles:padding" })), gap: t.Optional(a({ title: "Gap", description: "The gap between the bricks in the section.", default: "20px", "ui:styleId": "styles:gap" })), wrap: t.Optional(t.Boolean({ title: "Wrap", description: "Wrap bricks if they overflow the section.", default: !0, "ui:styleId": "styles:wrap" })), lastTouched: t.Optional(t.Number({ description: "Do not use this field. It is used internally by the editor.", "ui:field": "hidden", "ai:hidden": !0 })) }, { additionalProperties: !1 }), d = t.Object({ id: t.String({ description: "The unique ID of the section. Use a human readable url-safe slug", examples: ["content-section", "contact-section"] }), label: t.Optional(t.String({ description: "The label of the section. Used for editor purposes only.", examples: ["Content", "Contact"] })), order: t.Number({ description: "Determines section order in the page (lower numbers appear first). 0-based" }), props: c, mobileProps: t.Optional(t.Partial(c, { additionalProperties: !1 })), bricks: t.Array(x) }, { description: "Sections are direct children of the page that are stacked vertically." });
t.Omit(d, ["bricks"]);
var P = m(d.properties.props, "desktop"), S = m(d.properties.mobileProps, "mobile");
function W(e, i, o) {
  let s = (r) => ({ ...r, props: p({}, P, r.props), mobileProps: p({}, S, r.mobileProps || {}), bricks: r.bricks.map(h).filter(Boolean) }), n = e.map(s);
  return i.navbar && !o.noNavbar && n.unshift(s({ order: -1, id: "navbar-section", label: "Navbar section", props: { variant: "navbar", direction: "flex-row" }, mobileProps: {}, bricks: [{ id: "navbar", type: "navbar", props: i.navbar }] })), i.footer && !o.noFooter && n.push(s({ order: 1e3, id: "footer-section", label: "Footer section", props: { variant: "footer", direction: "flex-row" }, mobileProps: {}, bricks: [{ id: "footer", type: "footer", props: i.footer }] })), n;
}
function h(e) {
  let i = l[e.type];
  return { ...e, props: p({}, i.props, { ...e.props, ...e.props.$children ? { $children: e.props.$children.map(h).filter(Boolean) } : {} }) };
}
function q(e, i = !1) {
  let o = { ...l[e].props, ghost: i };
  return { id: `b-${w()}`, type: e, props: o };
}
export {
  w as a,
  T as b,
  x as c,
  c as e,
  d as f,
  W as j,
  h as k,
  q as l
};
//# sourceMappingURL=chunk-ML4JSDQM.js.map
