import e from "react";
import { Type as t } from "@sinclair/typebox";
function n(e, n = {}) {
	return t.Ref(e, { ...n });
}
var r = (e, n = {}) => t.Unsafe({
	type: "string",
	enum: e,
	...n
});
function i(e = {}) {
	return r([
		"shadow-none",
		"shadow-sm",
		"shadow-md",
		"shadow-lg",
		"shadow-xl",
		"shadow-2xl"
	], {
		$id: "styles:shadow",
		title: "Shadow",
		enumNames: [
			"None",
			"Small",
			"Medium",
			"Large",
			"XL",
			"2XL"
		],
		"ui:placeholder": "Not specified",
		"ui:field": "enum",
		"ui:display": "select",
		"ui:responsive": "desktop",
		"ui:styleId": "styles:shadow",
		...e
	});
}
function a(e = {}) {
	return n("styles:shadow", e);
}
function o(e = {}) {
	return r([
		"text-shadow-none",
		"text-shadow-sm",
		"text-shadow-md",
		"text-shadow-lg",
		"text-shadow-xl"
	], {
		$id: "styles:textShadow",
		title: "Text shadow",
		enumNames: [
			"None",
			"S",
			"M",
			"L",
			"XL"
		],
		"ui:display": "button-group",
		"ui:placeholder": "Not specified",
		"ui:field": "enum",
		"ui:styleId": "styles:textShadow",
		...e
	});
}
function s(e = {}) {
	return n("styles:textShadow", e);
}
function c(e, n = "Text color") {
	return t.String({
		title: n,
		$id: "styles:color",
		"ai:instructions": "hex/rgb/rgba color or classes like `text-<variant>-<shade>`, variants being `primary`, `secondary`, `accent` and `neutral`, and shades between 50 and 900",
		default: e,
		"ui:styleId": "styles:color",
		"ui:field": "color",
		"ui:color-type": "text"
	});
}
function l(e = {}) {
	return n("styles:color", {
		...e,
		"ui:styleId": "styles:color"
	});
}
function u(e, n = "Border color") {
	return t.String({
		title: n,
		$id: "styles:borderColor",
		"ai:instructions": "hex/rgb/rgba color or classes like `border-<variant>-<shade>`, variants being `primary`, `secondary`, `accent` and `neutral`, and shades between 50 and 900",
		default: e,
		"ui:styleId": "styles:borderColor",
		"ui:field": "color",
		"ui:color-type": "border"
	});
}
function d(e = {}) {
	return n("styles:borderColor", {
		...e,
		"ui:styleId": "styles:borderColor"
	});
}
function f(e = {}) {
	return t.Object({
		width: r([
			"border-0",
			"border",
			"border-2",
			"border-4",
			"border-8"
		], {
			title: "Width",
			enumNames: [
				"None",
				"Small",
				"Medium",
				"Large",
				"Extra large"
			],
			"ai:instructions": "Don't specify width if you want no border.",
			"ui:field": "enum",
			"ui:display": "select",
			"ui:placeholder": "None",
			default: "border-0"
		}),
		color: d({
			title: "Color",
			description: "The color of the border.",
			default: "border-current"
		})
	}, {
		title: "Border",
		$id: "styles:border",
		"ui:styleId": "styles:border",
		description: "Set the border width and color.",
		"ui:field": "border",
		"ui:responsive": !0,
		...e
	});
}
function p(e = {}) {
	return n("styles:border", e);
}
function m(e = {}) {
	return t.Optional(r([
		"rounded-auto",
		"rounded-none",
		"rounded-sm",
		"rounded-md",
		"rounded-lg",
		"rounded-xl",
		"rounded-2xl",
		"rounded-full"
	], {
		title: "Corner rounding",
		enumNames: [
			"Auto",
			"None",
			"Small",
			"Medium",
			"Large",
			"Extra large",
			"2xl",
			"Full"
		],
		$id: "styles:rounding",
		"ui:styleId": "styles:rounding",
		"ui:responsive": "desktop",
		...e
	}));
}
function ee(e = {}) {
	return n("styles:rounding", e);
}
var h = [
	"px",
	"%",
	"em",
	"rem",
	"vh",
	"vw",
	"dvh",
	"dvw",
	"rlh",
	"lh",
	"cqh",
	"cqw"
];
function g(e = {}) {
	return t.String({
		title: "Length",
		$id: "styles:cssLength",
		description: `A CSS length value. Must be a number with a unit (e.g. "10px", "50%"). The unit can be one of the following: ${h?.join(", ")}.`,
		default: e.default,
		"ui:field": "css-length",
		"ui:css-units": h,
		...e
	});
}
function _(e = {}) {
	return n("styles:cssLength", e);
}
function te(e = {}) {
	return r([
		"justify-start",
		"justify-center",
		"justify-end",
		"justify-between",
		"justify-around",
		"justify-evenly"
	], {
		enumNames: [
			"Start",
			"Center",
			"End",
			"Between",
			"Around",
			"Evenly"
		],
		$id: "styles:justifyContent",
		title: "Justify bricks",
		"ui:field": "justify-content",
		"ui:responsive": !0,
		"ui:styleId": "styles:justifyContent",
		...e
	});
}
function v(e = {}) {
	return n("styles:justifyContent", e);
}
function y(e = {}) {
	return r([
		"items-start",
		"items-center",
		"items-end",
		"items-stretch"
	], {
		enumNames: [
			"Start",
			"Center",
			"End",
			"Stretch"
		],
		$id: "styles:alignItems",
		title: "Align bricks",
		"ui:field": "align-items",
		"ui:responsive": !0,
		"ui:styleId": "styles:alignItems",
		...e
	});
}
function b(e = {}) {
	return n("styles:alignItems", e);
}
function x(e = {}) {
	return r([
		"self-auto",
		"self-start",
		"self-center",
		"self-end",
		"self-stretch"
	], {
		enumNames: [
			"Auto",
			"Start",
			"Center",
			"End",
			"Stretch"
		],
		default: "self-auto",
		$id: "styles:alignSelf",
		title: "Align self",
		"ui:field": "align-self",
		"ui:responsive": !0,
		"ui:styleId": "styles:alignSelf",
		...e
	});
}
function S(e = {}) {
	return n("styles:alignSelf", e);
}
function C() {
	return t.Object({
		desktop: t.Boolean(),
		mobile: t.Boolean()
	}, {
		$id: "styles:hidden",
		title: "Hidden",
		description: "Used to hide the brick on desktop or mobile.",
		"ui:field": "hidden"
	});
}
var w = {
	lastTouched: t.Optional(t.Number({
		"ui:field": "hidden",
		"ai:hidden": !0
	})),
	hidden: t.Optional(n("styles:hidden")),
	editable: t.Optional(t.Boolean({
		"ui:field": "hidden",
		"ai:hidden": !0
	})),
	width: t.Optional(_({
		title: "Fixed Width",
		description: "Set a fixed width for the brick. If not set, the brick will be responsive and will follow the flex layout of its parent section.",
		"ai:instructions": "Use percentage values to make the width responsive, like '50%'",
		"ui:field": "hidden"
	})),
	height: t.Optional(_({
		title: "Fixed height",
		description: "Set a fixed height for the brick. If not set, the brick will be responsive and will follow the flex layout of its parent section.",
		"ui:field": "hidden"
	})),
	grow: t.Optional(t.Boolean({
		title: "Auto expand",
		description: "If set, the brick will grow to fill the available space of its parent section or box.",
		"ui:styleId": "styles:grow",
		"ui:responsive": !0
	})),
	alignSelf: t.Optional(S())
};
t.Object(w);
function T(e) {
	return e.type === "object";
}
function E({ title: e, children: n, category: r = "settings", metadata: i, options: a }) {
	return T(n) ? t.Composite([t.Object({}), n], {
		title: e,
		metadata: {
			category: r,
			group: !0,
			...i
		},
		...a
	}) : t.Object(n, {
		title: e,
		...a,
		metadata: {
			category: r,
			group: !0,
			...i
		}
	});
}
function D(e, n) {
	let r = {
		...w,
		...e
	}, { alignSelf: i, grow: a,...o } = r, s = {
		...o,
		...n?.noAlignSelf ? {} : { alignSelf: i },
		...n?.noGrow ? {} : { grow: a }
	};
	return t.Object(s, n);
}
var ne = t.Array;
function O(e, n = {}) {
	return t.String({
		title: e,
		...n
	});
}
var re = t.String({ "ui:field": "page-id" });
function k(e = "URL", n) {
	return t.Union([t.String({ format: "uri" }), re], {
		$id: "content:urlOrPageId",
		default: n,
		title: e,
		metadata: { category: "content" },
		"ui:field": "url-page-id",
		"ai:instructions": "This field can be a URL or a page ID. Use the page ID when linking to a internal page, and a URL for external links."
	});
}
function A(e = {}) {
	return n("content:urlOrPageId", { ...e });
}
function j(e, n = {}) {
	return t.String({
		title: e ?? "Icon",
		"ai:instructions": "Use a iconify reference like 'mdi:heart' or 'fa-solid:coffee'.",
		"ui:field": "iconify",
		$id: "assets:icon",
		metadata: { category: "content" },
		...n
	});
}
function M(e = {}) {
	return n("assets:icon", e);
}
/*! Upstart.gg - Copyright (C) 2024 Flippable - https://github.com/upstart-gg/upstart/blob/main/LICENSE */
function N(e) {
	if (!("enum" in e)) return e.anyOf ?? e.oneOf;
	let { enum: t, enumNames: n, "ui:icons": r } = e;
	return t.map((e, t) => ({
		const: e,
		title: n ? n[t] : e,
		"ui:icon": r ? r[t] : void 0
	}));
}
function P(e, t) {
	if (e.type === "object" && "properties" in e) {
		let n = e, r = {};
		for (let [e, i] of Object.entries(n.properties)) {
			let n = F(i, t);
			n !== void 0 && (r[e] = n);
		}
		return r;
	}
	if (e.type === "array" && "items" in e) {
		let n = e;
		return t && typeof n[`default:${t}`] < "u" ? n[`default:${t}`] : n.default ? n.default : [];
	}
	throw Error("Schema must be either TObject or TArray");
}
function F(e, t) {
	if (t && typeof e[`default:${t}`] < "u") return e[`default:${t}`];
	if ("default" in e && e.default !== void 0) return e.default;
	if (e.type === "object" && "properties" in e) {
		let n = e, r = {};
		for (let [e, i] of Object.entries(n.properties)) {
			let n = F(i, t);
			n !== void 0 && (r[e] = n);
		}
		return Object.keys(r).length > 0 ? r : void 0;
	}
	e.type === "array" && "items" in e;
}
function I(e, t) {
	function n(e) {
		let r = {};
		for (let [i, a] of Object.entries(e.properties)) if (t(a)) r[i] = a;
		else if (a.type === "object" && a.properties) {
			let e = n(a);
			Object.keys(e).length > 0 && Object.assign(r, e);
		}
		return r;
	}
	return n(e);
}
function L({ props: e, defaultHeight: t, defaultWidth: n, category: r = "widgets", isContainer: i = !1, hideInLibrary: a = !1, deletable: o = !0, movable: s = !0, resizable: c = !0, duplicatable: l = !0, defaultInspectorTab: u = "preset", icon: d,...f }) {
	return {
		...f,
		icon: d,
		props: e,
		category: r,
		defaultInspectorTab: u,
		hideInLibrary: a,
		deletable: o,
		movable: s,
		resizable: c,
		duplicatable: l,
		isContainer: i,
		defaultWidth: {
			mobile: n?.mobile ?? "auto",
			desktop: n?.desktop ?? "auto"
		},
		defaultHeight: {
			mobile: t?.mobile ?? "auto",
			desktop: t?.desktop ?? "auto"
		}
	};
}
function R(e) {
	return {
		manifest: e,
		props: P(e.props),
		mobileProps: {}
	};
}
var z = {
	color: void 0,
	size: void 0,
	className: void 0,
	style: void 0,
	attr: void 0
}, B = e.createContext && /* @__PURE__ */ e.createContext(z), V = [
	"attr",
	"size",
	"title"
];
function H(e, t) {
	if (e == null) return {};
	var n = U(e, t), r, i;
	if (Object.getOwnPropertySymbols) {
		var a = Object.getOwnPropertySymbols(e);
		for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
	}
	return n;
}
function U(e, t) {
	if (e == null) return {};
	var n = {};
	for (var r in e) if (Object.prototype.hasOwnProperty.call(e, r)) {
		if (t.indexOf(r) >= 0) continue;
		n[r] = e[r];
	}
	return n;
}
function W() {
	return W = Object.assign ? Object.assign.bind() : function(e) {
		for (var t = 1; t < arguments.length; t++) {
			var n = arguments[t];
			for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
		}
		return e;
	}, W.apply(this, arguments);
}
function G(e, t) {
	var n = Object.keys(e);
	if (Object.getOwnPropertySymbols) {
		var r = Object.getOwnPropertySymbols(e);
		t && (r = r.filter(function(t) {
			return Object.getOwnPropertyDescriptor(e, t).enumerable;
		})), n.push.apply(n, r);
	}
	return n;
}
function K(e) {
	for (var t = 1; t < arguments.length; t++) {
		var n = arguments[t] == null ? {} : arguments[t];
		t % 2 ? G(Object(n), !0).forEach(function(t) {
			q(e, t, n[t]);
		}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : G(Object(n)).forEach(function(t) {
			Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
		});
	}
	return e;
}
function q(e, t, n) {
	return t = J(t), t in e ? Object.defineProperty(e, t, {
		value: n,
		enumerable: !0,
		configurable: !0,
		writable: !0
	}) : e[t] = n, e;
}
function J(e) {
	var t = Y(e, "string");
	return typeof t == "symbol" ? t : t + "";
}
function Y(e, t) {
	if (typeof e != "object" || !e) return e;
	var n = e[Symbol.toPrimitive];
	if (n !== void 0) {
		var r = n.call(e, t || "default");
		if (typeof r != "object") return r;
		throw TypeError("@@toPrimitive must return a primitive value.");
	}
	return (t === "string" ? String : Number)(e);
}
function X(t) {
	return t && t.map((t, n) => /* @__PURE__ */ e.createElement(t.tag, K({ key: n }, t.attr), X(t.child)));
}
function Z(t) {
	return (n) => /* @__PURE__ */ e.createElement(ie, W({ attr: K({}, t.attr) }, n), X(t.child));
}
function ie(t) {
	var n = (n) => {
		var { attr: r, size: i, title: a } = t, o = H(t, V), s = i || n.size || "1em", c;
		return n.className && (c = n.className), t.className && (c = (c ? c + " " : "") + t.className), /* @__PURE__ */ e.createElement("svg", W({
			stroke: "currentColor",
			fill: "currentColor",
			strokeWidth: "0"
		}, n.attr, r, o, {
			className: c,
			style: K(K({ color: t.color || n.color }, n.style), t.style),
			height: s,
			width: s,
			xmlns: "http://www.w3.org/2000/svg"
		}), a && /* @__PURE__ */ e.createElement("title", null, a), t.children);
	};
	return B === void 0 ? n(z) : /* @__PURE__ */ e.createElement(B.Consumer, null, (e) => n(e));
}
function ae(e) {
	return Z({
		tag: "svg",
		attr: {
			viewBox: "0 0 16 16",
			fill: "currentColor"
		},
		child: [{
			tag: "path",
			attr: { d: "M2 1.00073L1 2.00073V14.0007L2 15.0007H14L15 14.0007V2.00073L14 1.00073H2ZM2 10.0007V2.00073H14V10.0007H2ZM2 11.0007H14V14.0007H2V11.0007Z" },
			child: []
		}]
	})(e);
}
function oe(e) {
	return Z({
		tag: "svg",
		attr: {
			viewBox: "0 0 16 16",
			fill: "currentColor"
		},
		child: [{
			tag: "path",
			attr: { d: "M2 1.00073L1 2.00073V14.0007L2 15.0007H14L15 14.0007V2.00073L14 1.00073H2ZM2 14.0007V2.00073H6V14.0007H2ZM7 14.0007V2.00073H14V14.0007H7Z" },
			child: []
		}]
	})(e);
}
function se(e = !1, n = "Fixed position") {
	return t.Boolean({
		title: n,
		default: e,
		"ui:styleId": "styles:fixedPositioned"
	});
}
function Q(e = {}) {
	let { default: n, colorType: r = "background",...i } = e;
	return t.Object({
		color: t.Optional(t.String({
			default: n?.color,
			title: "Color",
			description: "Use `bg-<variant>-<shade>`, variants being 'primary', 'secondary', 'accent' and 'neutral', and shades between 50 and 900. Can also be a gradient using 'bg-gradient-to-<direction> from-<color> to-<color>'",
			examples: [
				"bg-primary",
				"bg-base-100",
				"bg-primary-50",
				"bg-primary-500",
				"bg-accent-900"
			]
		})),
		image: t.Optional(t.String({
			title: "Image",
			description: "The background image. Can be a URL or a data URI",
			examples: ["https://example.com/image.png", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA..."]
		})),
		size: t.Optional(t.Union([
			t.Literal("auto", { title: "Auto" }),
			t.Literal("cover", { title: "Cover" }),
			t.Literal("contain", { title: "Contain" })
		], {
			default: n?.size ?? "auto",
			"ai:instructions": "Only use this when the image is set."
		})),
		repeat: t.Optional(t.Union([
			t.Literal("no-repeat", { title: "No repeat" }),
			t.Literal("repeat", { title: "Repeat" }),
			t.Literal("repeat-x", { title: "Repeat horizontally" }),
			t.Literal("repeat-y", { title: "Repeat vertically" }),
			t.Literal("space", { title: "Space" }),
			t.Literal("round", { title: "Round" })
		], {
			default: n?.repeat ?? "no-repeat",
			"ai:instructions": "Only use this when the image is set."
		}))
	}, {
		$id: "styles:background",
		"ui:styleId": "styles:background",
		"ui:field": "background",
		"ui:group": "background",
		"ui:group:title": "Background",
		"ui:color-type": r,
		title: "Background",
		default: n ? {
			color: n.color,
			size: n.size,
			repeat: n.repeat
		} : void 0,
		...i
	});
}
function ce(e = {}) {
	return t.String({
		title: "Background color",
		$id: "styles:backgroundColor",
		"ai:instructions": "Can be set to transparent, hex/rgb/rgba color, or classes like `bg-<variant>-<shade>`, variants being primary, secondary, accent and neutral, and shades between 100 and 900. Use bg-<variant>-<shade> classes as much as possible.",
		"ui:field": "color",
		"ui:color-type": "background",
		"ui:styleId": "styles:backgroundColor",
		"ui:responsive": "desktop",
		...e
	});
}
function $(e = {}) {
	return n("styles:backgroundColor", e);
}
var le = L({
	type: "sidebar",
	category: "layout",
	name: "Sidebar",
	description: "A sidebard element",
	inlineDragDisabled: !0,
	aiInstructions: "This brick should be used on most sites/pages for navigation. By deault, it will display links\n    to the main pages of the site. You can customize the links by using the 'navigation.navItems' prop.",
	icon: oe,
	props: D({
		container: t.Optional(E({
			title: "Main element",
			children: {
				backgroundColor: t.Optional($()),
				border: t.Optional(p()),
				shadow: t.Optional(a()),
				fixedPositioned: t.Optional(se())
			},
			metadata: { "ui:responsive": !0 }
		})),
		navigation: t.Optional(E({
			title: "Links",
			children: { navItems: t.Optional(t.Array(t.Object({
				urlOrPageId: A(),
				label: t.Optional(O("Label"))
			}), {
				title: "Navigation items",
				default: []
			})) }
		}))
	})
}), ue = [{
	description: "Standard sidebar with navigation links base on site pages",
	type: "sidebar",
	props: {}
}, {
	description: "Sidebar with specified navigation links",
	type: "sidebar",
	props: {
		container: { backgroundColor: "#f0f0f0" },
		navigation: { navItems: [{
			urlOrPageId: "https://google.com",
			label: "Google"
		}, {
			urlOrPageId: "https://bing.com",
			label: "Bing"
		}] }
	}
}];
export { y as A, g as B, _ as C, m as D, ee as E, p as F, f as G, u as H, l as I, c as J, i as K, s as L, o as M, a as N, r as O, n as P, le as b, ue as c, Q as d, ce as e, $ as f, ae as g, Z as h, L as i, R as j, P as k, N as l, I as m, A as n, j as o, O as p, M as q, k as r, D as s, ne as t, E as u, C as v, b as w, v as x, x as y, te as z };

//# sourceMappingURL=chunk-LSPN22SI.D75E3zS-.js.map