import { hasSlotContent as e } from "../../common/utils/index.js";
import t from "../stack/stack.js";
import { EMPTY_STATE_BODY_SIZE_MODIFIERS as n, EMPTY_STATE_CONTENT_SIZE_MODIFIERS as r, EMPTY_STATE_HEADLINE_SIZE_MODIFIERS as i, EMPTY_STATE_SIZE_MODIFIERS as a } from "./empty-state-constants.js";
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createVNode as d, normalizeClass as f, onMounted as p, openBlock as m, renderSlot as h, toDisplayString as g, unref as _, useSlots as v, withCtx as y } from "vue";
//#region components/empty_state/empty_state.vue
var b = {
	key: 0,
	class: "d-empty-state__illustration"
}, x = {
	key: 1,
	class: "d-empty-state__icon"
}, S = {
	__name: "empty_state",
	props: {
		size: {
			type: String,
			default: "lg",
			validator: (e) => Object.keys(a).includes(e)
		},
		headerText: {
			type: String,
			required: !0
		},
		bodyText: {
			type: String,
			default: null
		}
	},
	setup(S) {
		let C = v(), w = S, T = o(() => e(C.icon)), E = o(() => e(C.illustration)), D = o(() => w.size === "sm"), O = o(() => T.value && (!E.value || D.value)), k = o(() => E.value && !D.value), A = o(() => a[w.size]), j = o(() => ["d-empty-state", A.value]), M = o(() => r[w.size]), N = o(() => i[w.size]), P = o(() => n[w.size]);
		return p(() => {
			!w.bodyText && !e(C.body) && console.error("DtEmptyState: You should provide either bodyText or content on body slot.");
		}), (e, n) => (m(), s(_(t), { class: f(j.value) }, {
			default: y(() => [
				k.value ? (m(), l("span", b, [h(e.$slots, "illustration")])) : c("", !0),
				O.value ? (m(), l("span", x, [h(e.$slots, "icon", { iconSize: "800" })])) : c("", !0),
				d(_(t), {
					gap: "450",
					class: f(["d-empty-state__content", M.value])
				}, {
					default: y(() => [u("div", { class: f(["d-empty-state__header-text", N.value]) }, g(S.headerText), 3), S.bodyText ? (m(), l("p", {
						key: 0,
						class: f(["d-empty-state__body-text", P.value])
					}, g(S.bodyText), 3)) : c("", !0)]),
					_: 1
				}, 8, ["class"]),
				h(e.$slots, "body")
			]),
			_: 3
		}, 8, ["class"]));
	}
};
//#endregion
export { S as default };

//# sourceMappingURL=empty-state.js.map