import { M as e, P as t, V as n, ct as r, f as i, g as a, it as o, m as s, ot as c, p as l, u, v as d, x as f, y as p } from "./draggable-P6QWzy4g.js";
import { Pt as m } from "./features-DzIN-Nua.js";
import { f as h } from "./styleConstants-DP1VOca8.js";
import { i as g, n as _, r as v, t as y } from "./NumberWithSuffix-BIFgtqGs.js";
//#region src/components/toolbar/CheckboxItem.vue?vue&type=script&setup=true&lang.ts
var b = { class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:text-[12px] tpl:text-[var(--tpl-text)]" }, x = ["checked"], S = /* @__PURE__ */ f({
	__name: "CheckboxItem",
	props: {
		modelValue: { type: Boolean },
		label: {}
	},
	emits: ["update:modelValue"],
	setup(t, { emit: n }) {
		let i = n;
		return (n, o) => (e(), a("label", b, [l("input", {
			type: "checkbox",
			class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
			checked: t.modelValue,
			onChange: o[0] ||= (e) => i("update:modelValue", e.target.checked)
		}, null, 40, x), d(" " + r(t.label), 1)]));
	}
}), C = ["value"], w = ["value"], T = ["value"], E = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, D = ["value"], O = { value: "" }, k = ["value"], A = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, j = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-3" }, M = { class: "tpl:grid tpl:grid-cols-2 tpl:gap-2" }, N = [
	"value",
	"placeholder",
	"onInput"
], P = ["value", "placeholder"], F = ["value"], I = /* @__PURE__ */ f({
	__name: "CountdownToolbar",
	props: {
		block: {},
		fontFamilies: {}
	},
	emits: ["update"],
	setup(d, { emit: f }) {
		let b = f, { t: x } = m(), I = [
			"UTC",
			"America/New_York",
			"America/Chicago",
			"America/Denver",
			"America/Los_Angeles",
			"Europe/London",
			"Europe/Berlin",
			"Europe/Paris",
			"Europe/Moscow",
			"Asia/Dubai",
			"Asia/Kolkata",
			"Asia/Shanghai",
			"Asia/Tokyo",
			"Australia/Sydney",
			"Pacific/Auckland"
		], L = [
			{
				value: ":",
				label: ":"
			},
			{
				value: "-",
				label: "-"
			},
			{
				value: " ",
				label: "␣"
			}
		], R = [
			"Days",
			"Hours",
			"Minutes",
			"Seconds"
		], z = i(() => R.map((e) => ({
			unit: e,
			showKey: `show${e}`,
			labelKey: `label${e}`,
			translationKey: e.toLowerCase()
		})));
		function B(e, t) {
			b("update", { [e]: t });
		}
		return (i, f) => (e(), a(u, null, [
			p(_, { label: o(x).countdown.targetDate }, {
				default: n(() => [l("input", {
					type: "datetime-local",
					class: c(o(h)),
					value: d.block.targetDate,
					onInput: f[0] ||= (e) => B("targetDate", e.target.value)
				}, null, 42, C)]),
				_: 1
			}, 8, ["label"]),
			p(_, { label: o(x).countdown.timezone }, {
				default: n(() => [l("select", {
					class: c(o(h)),
					value: d.block.timezone,
					onChange: f[1] ||= (e) => B("timezone", e.target.value)
				}, [(e(), a(u, null, t(I, (e) => l("option", {
					key: e,
					value: e
				}, r(e), 9, T)), 64))], 42, w)]),
				_: 1
			}, 8, ["label"]),
			p(_, { label: o(x).countdown.display }, {
				default: n(() => [l("div", E, [(e(!0), a(u, null, t(z.value, (t) => (e(), s(S, {
					key: t.unit,
					"model-value": d.block[t.showKey],
					label: o(x).countdown[t.translationKey],
					"onUpdate:modelValue": (e) => B(t.showKey, e)
				}, null, 8, [
					"model-value",
					"label",
					"onUpdate:modelValue"
				]))), 128))])]),
				_: 1
			}, 8, ["label"]),
			p(_, { label: o(x).countdown.separator }, {
				default: n(() => [p(v, {
					options: L,
					"model-value": d.block.separator,
					"onUpdate:modelValue": f[2] ||= (e) => B("separator", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"]),
			p(_, { label: o(x).countdown.fontFamily }, {
				default: n(() => [l("select", {
					class: c(o(h)),
					value: d.block.fontFamily || "",
					onChange: f[3] ||= (e) => B("fontFamily", e.target.value || void 0)
				}, [l("option", O, r(o(x).countdown.inheritFont), 1), (e(!0), a(u, null, t(d.fontFamilies, (t) => (e(), a("option", {
					key: t.value,
					value: t.value
				}, r(t.label), 9, k))), 128))], 42, D)]),
				_: 1
			}, 8, ["label"]),
			l("div", A, [p(_, { label: o(x).countdown.digitFontSize }, {
				default: n(() => [p(y, {
					"model-value": d.block.digitFontSize,
					min: 12,
					max: 72,
					suffix: "px",
					"onUpdate:modelValue": f[4] ||= (e) => B("digitFontSize", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"]), p(_, { label: o(x).countdown.labelFontSize }, {
				default: n(() => [p(y, {
					"model-value": d.block.labelFontSize,
					min: 8,
					max: 24,
					suffix: "px",
					"onUpdate:modelValue": f[5] ||= (e) => B("labelFontSize", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"])]),
			l("div", j, [p(_, { label: o(x).countdown.digitColor }, {
				default: n(() => [p(g, {
					"model-value": d.block.digitColor,
					"onUpdate:modelValue": f[6] ||= (e) => B("digitColor", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"]), p(_, { label: o(x).countdown.labelColor }, {
				default: n(() => [p(g, {
					"model-value": d.block.labelColor,
					"onUpdate:modelValue": f[7] ||= (e) => B("labelColor", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"])]),
			p(_, { label: o(x).countdown.background }, {
				default: n(() => [p(g, {
					"model-value": d.block.backgroundColor,
					"onUpdate:modelValue": f[8] ||= (e) => B("backgroundColor", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"]),
			p(_, { label: o(x).countdown.labels }, {
				default: n(() => [l("div", M, [(e(!0), a(u, null, t(z.value, (t) => (e(), a("input", {
					key: t.unit,
					type: "text",
					class: c(o(h)),
					value: d.block[t.labelKey],
					placeholder: o(x).countdown[t.translationKey],
					onInput: (e) => B(t.labelKey, e.target.value)
				}, null, 42, N))), 128))])]),
				_: 1
			}, 8, ["label"]),
			p(_, { label: o(x).countdown.expiry }, {
				default: n(() => [l("input", {
					type: "text",
					class: c(o(h)),
					value: d.block.expiredMessage,
					placeholder: o(x).countdown.expiredMessagePlaceholder,
					onInput: f[9] ||= (e) => B("expiredMessage", e.target.value)
				}, null, 42, P)]),
				_: 1
			}, 8, ["label"]),
			p(_, { label: o(x).countdown.expiredImageUrl }, {
				default: n(() => [l("input", {
					type: "url",
					class: c(o(h)),
					value: d.block.expiredImageUrl,
					placeholder: "https://...",
					onInput: f[10] ||= (e) => B("expiredImageUrl", e.target.value)
				}, null, 42, F)]),
				_: 1
			}, 8, ["label"]),
			p(S, {
				"model-value": d.block.hideOnExpiry,
				label: o(x).countdown.hideOnExpiry,
				class: "tpl:mb-3.5",
				"onUpdate:modelValue": f[11] ||= (e) => B("hideOnExpiry", e)
			}, null, 8, ["model-value", "label"])
		], 64));
	}
});
//#endregion
export { I as default };

//# sourceMappingURL=CountdownToolbar-DltwuOer.js.map