const require_chunk = require("./chunk-9hOWP6kD.cjs");
const require_registries = require("./registries-zFvhorZ2.cjs");
let react_jsx_runtime = require("react/jsx-runtime");
//#region ../widgets/src/widgets/BulletListWidget.tsx
var BulletListWidget_exports = /* @__PURE__ */ require_chunk.__exportAll({
	BulletListWidget: () => BulletListWidget,
	bulletListWidgetPropertySchema: () => bulletListWidgetPropertySchema
});
function BulletListWidget({ titleEnabled = true, title = "List", titleFontSize = "lg", titleColor = "foreground", listType = "unordered", items = [
	"Item 1",
	"Item 2",
	"Item 3"
], itemFontSize = "md", itemColor = "foreground", background = {
	type: "solid",
	color: "background"
}, padding = 4, borderRadius = "md", borderWidth = "none", borderColor = "muted", gapSize = "sm", className, ...props }) {
	const backgroundColor = background.color ?? "background";
	const backgroundImage = (background.resource?.image_url || background.resource?.imageUrl) && background.type === "image" ? `url(${background.resource.image_url || background.resource.imageUrl})` : "none";
	const listItems = typeof items === "string" ? items.split("\n").filter(Boolean) : items ?? [];
	const ListTag = listType === "ordered" ? "ol" : "ul";
	const listStyleClass = listType === "ordered" ? "list-decimal" : "list-disc";
	const gap = require_registries.gapValues[gapSize] ?? require_registries.gapValues.sm;
	return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
		className: `bg-${backgroundColor} p-${padding} rounded-${borderRadius} ${require_registries.borderWidthClasses[borderWidth]} ${borderWidth !== "none" ? require_registries.borderColorClasses[borderColor] : ""} ${className ?? ""}`,
		style: { backgroundImage },
		...props,
		children: [titleEnabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", {
			className: `text-${titleFontSize} text-${titleColor} font-header mb-2 font-bold`,
			children: title
		}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ListTag, {
			className: `${listStyleClass} pl-5 text-${itemFontSize} text-${itemColor}`,
			style: {
				display: "flex",
				flexDirection: "column",
				gap
			},
			children: listItems.map((item, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: item }, index))
		})]
	});
}
const bulletListWidgetPropertySchema = {
	widgetType: "BulletListWidget",
	displayName: "Bullet List",
	fields: [
		{
			key: "titleEnabled",
			label: "Widget Title",
			type: "boolean",
			description: "Enable the title displayed above the list",
			defaultValue: true,
			group: "Title"
		},
		{
			key: "title",
			label: "Title",
			type: "text",
			description: "The title",
			defaultValue: "List",
			group: "Title",
			requiresKeyToBeTrue: "titleEnabled"
		},
		require_registries.getFontSizeField({
			key: "titleFontSize",
			label: "Title Font Size",
			description: "Font size for the title",
			defaultValue: "lg",
			group: "Title",
			requiresKeyToBeTrue: "titleEnabled"
		}),
		require_registries.getColorField({
			key: "titleColor",
			label: "Title Color",
			description: "The color of the title",
			defaultValue: "foreground",
			group: "Title",
			requiresKeyToBeTrue: "titleEnabled"
		}),
		{
			key: "listType",
			label: "List Type",
			type: "select",
			description: "Ordered (numbered) or unordered (bullets)",
			options: [{
				label: "Bullets",
				value: "unordered"
			}, {
				label: "Numbered",
				value: "ordered"
			}],
			defaultValue: "unordered",
			group: "List"
		},
		{
			key: "items",
			label: "List Items",
			type: "stringArray",
			description: "Add or remove list items",
			defaultValue: [
				"Item 1",
				"Item 2",
				"Item 3"
			],
			group: "List"
		},
		require_registries.getFontSizeField({
			key: "itemFontSize",
			label: "Item Font Size",
			description: "Font size for list items",
			defaultValue: "md",
			group: "List"
		}),
		require_registries.getColorField({
			key: "itemColor",
			label: "Item Color",
			description: "The color of list items",
			defaultValue: "foreground",
			group: "List"
		}),
		{
			type: "background",
			key: "background",
			label: "Background",
			description: "Background for the list container",
			defaultValue: "background",
			group: "Style"
		},
		require_registries.getPaddingField({
			key: "padding",
			label: "Padding",
			description: "The padding of the list container",
			defaultValue: 4,
			group: "Style"
		}),
		require_registries.getBorderRadiusField({
			key: "borderRadius",
			label: "Border Radius",
			description: "The border radius of the list container",
			group: "Design"
		}),
		require_registries.getBorderWidthField({
			key: "borderWidth",
			label: "Border Width",
			description: "Border width for the widget",
			defaultValue: "none",
			group: "Design"
		}),
		require_registries.getBorderColorField({
			key: "borderColor",
			label: "Border Color",
			description: "Border color for the widget",
			defaultValue: "muted",
			group: "Design"
		}),
		require_registries.getGapField({
			key: "gapSize",
			label: "Item Gap",
			description: "Gap between list items",
			defaultValue: "sm",
			group: "Style"
		})
	]
};
//#endregion
Object.defineProperty(exports, "BulletListWidget", {
	enumerable: true,
	get: function() {
		return BulletListWidget;
	}
});
Object.defineProperty(exports, "BulletListWidget_exports", {
	enumerable: true,
	get: function() {
		return BulletListWidget_exports;
	}
});
Object.defineProperty(exports, "bulletListWidgetPropertySchema", {
	enumerable: true,
	get: function() {
		return bulletListWidgetPropertySchema;
	}
});

//# sourceMappingURL=BulletListWidget-Dz_32RH1.cjs.map