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