import { F as e, H as t, N as n, S as r, _ as i, at as a, b as o, d as s, h as c, lt as l, m as u, p as d, st as f, y as p } from "./draggable-Bcb86AsV.js";
import { Mt as m } from "./features-BnG-dhzy.js";
import { f as h } from "./styleConstants-DP1VOca8.js";
import { i as g, n as _, r as v, t as y } from "./NumberWithSuffix-DnqYqSKs.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__ */ r({
	__name: "CheckboxItem",
	props: {
		modelValue: { type: Boolean },
		label: {}
	},
	emits: ["update:modelValue"],
	setup(e, { emit: t }) {
		let r = t;
		return (t, a) => (n(), i("label", b, [u("input", {
			type: "checkbox",
			class: "tpl:size-3.5 tpl:cursor-pointer tpl:accent-[var(--tpl-primary)]",
			checked: e.modelValue,
			onChange: a[0] ||= (e) => r("update:modelValue", e.target.checked)
		}, null, 40, x), p(" " + l(e.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__ */ r({
	__name: "CountdownToolbar",
	props: {
		block: {},
		fontFamilies: {}
	},
	emits: ["update"],
	setup(r, { emit: p }) {
		let b = p, { 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 = d(() => R.map((e) => ({
			unit: e,
			showKey: `show${e}`,
			labelKey: `label${e}`,
			translationKey: e.toLowerCase()
		})));
		function B(e, t) {
			b("update", { [e]: t });
		}
		return (d, p) => (n(), i(s, null, [
			o(_, { label: a(x).countdown.targetDate }, {
				default: t(() => [u("input", {
					type: "datetime-local",
					class: f(a(h)),
					value: r.block.targetDate,
					onInput: p[0] ||= (e) => B("targetDate", e.target.value)
				}, null, 42, C)]),
				_: 1
			}, 8, ["label"]),
			o(_, { label: a(x).countdown.timezone }, {
				default: t(() => [u("select", {
					class: f(a(h)),
					value: r.block.timezone,
					onChange: p[1] ||= (e) => B("timezone", e.target.value)
				}, [(n(), i(s, null, e(I, (e) => u("option", {
					key: e,
					value: e
				}, l(e), 9, T)), 64))], 42, w)]),
				_: 1
			}, 8, ["label"]),
			o(_, { label: a(x).countdown.display }, {
				default: t(() => [u("div", E, [(n(!0), i(s, null, e(z.value, (e) => (n(), c(S, {
					key: e.unit,
					"model-value": r.block[e.showKey],
					label: a(x).countdown[e.translationKey],
					"onUpdate:modelValue": (t) => B(e.showKey, t)
				}, null, 8, [
					"model-value",
					"label",
					"onUpdate:modelValue"
				]))), 128))])]),
				_: 1
			}, 8, ["label"]),
			o(_, { label: a(x).countdown.separator }, {
				default: t(() => [o(v, {
					options: L,
					"model-value": r.block.separator,
					"onUpdate:modelValue": p[2] ||= (e) => B("separator", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"]),
			o(_, { label: a(x).countdown.fontFamily }, {
				default: t(() => [u("select", {
					class: f(a(h)),
					value: r.block.fontFamily || "",
					onChange: p[3] ||= (e) => B("fontFamily", e.target.value || void 0)
				}, [u("option", O, l(a(x).countdown.inheritFont), 1), (n(!0), i(s, null, e(r.fontFamilies, (e) => (n(), i("option", {
					key: e.value,
					value: e.value
				}, l(e.label), 9, k))), 128))], 42, D)]),
				_: 1
			}, 8, ["label"]),
			u("div", A, [o(_, { label: a(x).countdown.digitFontSize }, {
				default: t(() => [o(y, {
					"model-value": r.block.digitFontSize,
					min: 12,
					max: 72,
					suffix: "px",
					"onUpdate:modelValue": p[4] ||= (e) => B("digitFontSize", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"]), o(_, { label: a(x).countdown.labelFontSize }, {
				default: t(() => [o(y, {
					"model-value": r.block.labelFontSize,
					min: 8,
					max: 24,
					suffix: "px",
					"onUpdate:modelValue": p[5] ||= (e) => B("labelFontSize", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"])]),
			u("div", j, [o(_, { label: a(x).countdown.digitColor }, {
				default: t(() => [o(g, {
					"model-value": r.block.digitColor,
					"onUpdate:modelValue": p[6] ||= (e) => B("digitColor", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"]), o(_, { label: a(x).countdown.labelColor }, {
				default: t(() => [o(g, {
					"model-value": r.block.labelColor,
					"onUpdate:modelValue": p[7] ||= (e) => B("labelColor", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"])]),
			o(_, { label: a(x).countdown.background }, {
				default: t(() => [o(g, {
					"model-value": r.block.backgroundColor,
					"onUpdate:modelValue": p[8] ||= (e) => B("backgroundColor", e)
				}, null, 8, ["model-value"])]),
				_: 1
			}, 8, ["label"]),
			o(_, { label: a(x).countdown.labels }, {
				default: t(() => [u("div", M, [(n(!0), i(s, null, e(z.value, (e) => (n(), i("input", {
					key: e.unit,
					type: "text",
					class: f(a(h)),
					value: r.block[e.labelKey],
					placeholder: a(x).countdown[e.translationKey],
					onInput: (t) => B(e.labelKey, t.target.value)
				}, null, 42, N))), 128))])]),
				_: 1
			}, 8, ["label"]),
			o(_, { label: a(x).countdown.expiry }, {
				default: t(() => [u("input", {
					type: "text",
					class: f(a(h)),
					value: r.block.expiredMessage,
					placeholder: a(x).countdown.expiredMessagePlaceholder,
					onInput: p[9] ||= (e) => B("expiredMessage", e.target.value)
				}, null, 42, P)]),
				_: 1
			}, 8, ["label"]),
			o(_, { label: a(x).countdown.expiredImageUrl }, {
				default: t(() => [u("input", {
					type: "url",
					class: f(a(h)),
					value: r.block.expiredImageUrl,
					placeholder: "https://...",
					onInput: p[10] ||= (e) => B("expiredImageUrl", e.target.value)
				}, null, 42, F)]),
				_: 1
			}, 8, ["label"]),
			o(S, {
				"model-value": r.block.hideOnExpiry,
				label: a(x).countdown.hideOnExpiry,
				class: "tpl:mb-3.5",
				"onUpdate:modelValue": p[11] ||= (e) => B("hideOnExpiry", e)
			}, null, 8, ["model-value", "label"])
		], 64));
	}
});
//#endregion
export { I as default };

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