import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
import { t } from "./vue-i18n-Db_oYfO8.js";
import { a as n, o as r } from "./composables-DEdhzUqN.js";
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeModels as p, mergeProps as m, nextTick as h, normalizeClass as g, onMounted as _, onUnmounted as v, openBlock as y, ref as b, renderSlot as x, resolveComponent as S, toDisplayString as C, unref as w, useAttrs as T, useModel as E, vShow as D, watch as O, withCtx as k, withDirectives as A } from "vue";
//#region src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.js
var j = () => {
	let e = b(!1), t = b(0), n = b(() => {});
	function r({ deleted: r, callback: i }) {
		Array.isArray(r) ? t.value = r.length : t.value = 1, e.value = !0, n.value = i;
	}
	function i() {
		e.value = !1;
	}
	return {
		isVisible: e,
		deleteCount: t,
		deleteCallback: n,
		askDeleteConfirmation: r,
		closeDelete: i
	};
}, M = { class: "delete-confirmation-popup__content" }, N = { class: "delete-confirmation-popup__message" }, P = /*#__PURE__*/ e({
	__name: "delete-confirmation-popup",
	props: {
		deleteCount: {
			type: Number,
			required: !0
		},
		callback: {
			type: Function,
			required: !0
		}
	},
	emits: ["close"],
	setup(e, { emit: n }) {
		let r = e, i = T(), { t: s } = t(), c = a(() => r.deleteCount === 0 ? s("webitelUI.deleteConfirmationPopup.tableAskingAlert", 2, null, { count: s("webitelUI.deleteConfirmationPopup.deleteAll") }) : s("webitelUI.deleteConfirmationPopup.tableAskingAlert", { count: r.deleteCount }, null));
		return (t, n) => {
			let r = S("wt-icon"), a = S("wt-button"), s = S("wt-confirm-dialog");
			return y(), o(s, m(w(i), {
				class: "delete-confirmation-popup",
				title: t.$t("webitelUI.deleteConfirmationPopup.title"),
				callback: e.callback,
				onClose: n[0] ||= (e) => t.$emit("close")
			}), {
				main: k(() => [l("div", M, [d(r, {
					color: "error",
					icon: "attention"
				}), l("p", N, [x(t.$slots, "deleteMessage", {}, () => [u(C(c.value), 1)], !0)])])]),
				actions: k(({ isDeleting: e, close: n, confirm: r }) => [d(a, {
					loading: e,
					onClick: r
				}, {
					default: k(() => [u(C(t.$t("vocabulary.yes")), 1)], void 0, !0),
					_: 1
				}, 8, ["loading", "onClick"]), d(a, {
					disabled: e,
					color: "secondary",
					onClick: n
				}, {
					default: k(() => [u(C(t.$t("vocabulary.no")), 1)], void 0, !0),
					_: 1
				}, 8, ["disabled", "onClick"])]),
				_: 3
			}, 16, ["title", "callback"]);
		};
	}
}, [["__scopeId", "data-v-95c498c1"]]), F = ["src", "alt"], I = ["src", "alt"], L = { class: "wt-galleria__footer" }, R = {
	key: 0,
	class: "wt-galleria__footer-info"
}, z = { class: "wt-galleria__footer-actions" }, B = /* @__PURE__ */ f({
	__name: "wt-galleria",
	props: /*@__PURE__*/ p({
		value: {},
		id: {},
		activeIndex: {},
		fullScreen: { type: Boolean },
		visible: { type: Boolean },
		numVisible: {},
		responsiveOptions: {},
		showItemNavigators: { type: Boolean },
		showThumbnailNavigators: { type: Boolean },
		showItemNavigatorsOnHover: { type: Boolean },
		changeItemOnIndicatorHover: { type: Boolean },
		circular: { type: Boolean },
		autoPlay: { type: Boolean },
		transitionInterval: {},
		showThumbnails: { type: Boolean },
		thumbnailsPosition: {},
		verticalThumbnailViewPortHeight: {},
		showIndicators: { type: Boolean },
		showIndicatorsOnItem: { type: Boolean },
		indicatorsPosition: {},
		baseZIndex: {},
		maskClass: {},
		containerStyle: {},
		containerClass: {},
		containerProps: {},
		prevButtonProps: {},
		nextButtonProps: {},
		ariaLabel: {},
		ariaRoledescription: {},
		dt: {},
		pt: {},
		ptOptions: {},
		unstyled: { type: Boolean }
	}, {
		visible: {
			type: Boolean,
			required: !0
		},
		visibleModifiers: {},
		activeIndex: {
			default: 0,
			required: !1
		},
		activeIndexModifiers: {}
	}),
	emits: /*@__PURE__*/ p(["download", "delete"], ["update:visible", "update:activeIndex"]),
	setup(e, { emit: t }) {
		let u = e, f = t, p = E(e, "visible"), m = E(e, "activeIndex"), x = a(() => u.value[m.value]), T = b(!0), M = b(!0), { fullScreen: N, toggleFullScreen: B } = r(), { listenMaskElementClick: V, removeMaskElementClick: H } = n(p), { isVisible: U, deleteCount: W, deleteCallback: G, askDeleteConfirmation: K, closeDelete: q } = j(), J = () => {
			M.value = !M.value;
		}, Y = () => {
			T.value = !1;
		}, X = () => {
			N.value && B(), K({
				deleteCount: 1,
				callback: () => f("delete", m)
			});
		};
		return O(() => x.value, (e, t) => {
			e?.src !== t?.src && (T.value = !0);
		}, { deep: !0 }), O(() => p.value, () => {
			p.value ? h(() => {
				V();
			}) : (m.value = 0, H());
		}), O(() => u.value, () => {
			u.value.length || (p.value = !1);
		}), _(() => {
			p.value && V();
		}), v(() => {
			H();
		}), (t, n) => {
			let r = S("wt-loader"), a = S("wt-icon"), u = S("p-galleria");
			return y(), c(i, null, [d(u, {
				visible: p.value,
				"onUpdate:visible": n[1] ||= (e) => p.value = e,
				"active-index": m.value,
				"onUpdate:activeIndex": n[2] ||= (e) => m.value = e,
				value: e.value,
				"show-thumbnails": M.value,
				"full-screen": "",
				circular: "",
				"show-item-navigators": "",
				"num-visible": 5,
				pt: {
					root: { class: [{ "flex flex-col": w(N) }] },
					content: { class: ["relative", { "wt-galleria__content--fullscreen": w(N) }] },
					thumbnails: "wt-galleria__thumbnails",
					closeButton: { style: { display: w(N) ? "none" : "block" } }
				}
			}, {
				item: k(({ item: e }) => [l("div", { class: g(["wt-galleria__image-container", { "wt-galleria__image-container--preview": !w(N) }]) }, [T.value ? (y(), o(r, { key: 0 })) : s("", !0), A(l("img", {
					class: g(["wt-galleria__image", { "wt-galleria__image--fullscreen": w(N) }]),
					src: e?.src,
					alt: e?.title,
					onLoad: Y
				}, null, 42, F), [[D, !T.value]])], 2)]),
				thumbnail: k(({ item: e }) => [l("img", {
					src: e?.thumbnailSrc,
					alt: e?.title,
					class: "wt-galleria__thumbnail"
				}, null, 8, I)]),
				closeicon: k(() => [d(a, { icon: "close" })]),
				previousitemicon: k(() => [d(a, { icon: "arrow-left" })]),
				nextitemicon: k(() => [d(a, { icon: "arrow-right" })]),
				previousthumbnailicon: k(() => [d(a, { icon: "arrow-left" })]),
				nextthumbnailicon: k(() => [d(a, { icon: "arrow-right" })]),
				footer: k(() => [l("div", L, [
					d(a, {
						icon: "tile",
						onClick: J
					}),
					e.value.length ? (y(), c("span", R, [
						l("span", null, C(m.value + 1) + "/" + C(e.value.length), 1),
						l("span", null, C(e.value[m.value].title), 1),
						l("span", null, C(e.value[m.value].description), 1)
					])) : s("", !0),
					l("div", z, [
						d(a, {
							icon: "download",
							onClick: n[0] ||= (e) => f("download", m.value)
						}),
						d(a, {
							icon: "bucket",
							onClick: X
						}),
						d(a, {
							icon: w(N) ? "collapse" : "expand",
							onClick: w(B)
						}, null, 8, ["icon", "onClick"])
					])
				])]),
				_: 1
			}, 8, [
				"visible",
				"active-index",
				"value",
				"show-thumbnails",
				"pt"
			]), d(P, {
				shown: w(U),
				callback: w(G),
				"delete-count": w(W),
				onClose: w(q)
			}, null, 8, [
				"shown",
				"callback",
				"delete-count",
				"onClose"
			])], 64);
		};
	}
});
//#endregion
export { B as default };
