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