import { n as __exportAll } from "./chunk-B-1-B7_t.js";
import { a as CardDescription_default, n as CardTitle_default, o as CardContent_default, r as CardHeader_default, s as Card_default } from "./card-X74FuL7B.js";
import { t as ElementRenderer_default } from "./ElementRenderer-DV1pZRd4.js";
import { computed, createBlock, createCommentVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, toDisplayString, unref, withCtx } from "vue";
//#region src/components/compositions/cards/ElementDisplayCard.vue?vue&type=script&setup=true&lang.ts
var ElementDisplayCard_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
	__name: "ElementDisplayCard",
	props: {
		title: {},
		subtitle: {},
		showCard: {
			type: Boolean,
			default: false
		},
		element: {},
		item: { default: () => ({}) }
	},
	setup(__props) {
		/**
		* Props-driven `element-display` composition. Renders a single
		* CardElement standalone (no label, no column wrapping, no card chrome
		* by default).
		*
		* Self-contained — directly mountable in any Vue app:
		*
		*   <ElementDisplayCard
		*     :element="myChartElement"
		*     :item="dataModel"
		*     title="Featured widget"
		*     show-card
		*   />
		*
		* Renders nothing when `element` is not provided — keeps a missing
		* reference from breaking the page. ID resolution happens upstream in
		* `CardRenderer`.
		*/
		const props = __props;
		const showChrome = computed(() => props.showCard === true);
		const hasHeader = computed(() => Boolean(props.title) || Boolean(props.subtitle));
		return (_ctx, _cache) => {
			return showChrome.value && __props.element ? (openBlock(), createBlock(unref(Card_default), {
				key: 0,
				class: "flex flex-col"
			}, {
				default: withCtx(() => [hasHeader.value ? (openBlock(), createBlock(unref(CardHeader_default), { key: 0 }, {
					default: withCtx(() => [__props.title ? (openBlock(), createBlock(unref(CardTitle_default), { key: 0 }, {
						default: withCtx(() => [createTextVNode(toDisplayString(__props.title), 1)]),
						_: 1
					})) : createCommentVNode("", true), __props.subtitle ? (openBlock(), createBlock(unref(CardDescription_default), { key: 1 }, {
						default: withCtx(() => [createTextVNode(toDisplayString(__props.subtitle), 1)]),
						_: 1
					})) : createCommentVNode("", true)]),
					_: 1
				})) : createCommentVNode("", true), createVNode(unref(CardContent_default), { class: normalizeClass([hasHeader.value ? "" : "pt-6"]) }, {
					default: withCtx(() => [createVNode(ElementRenderer_default, {
						element: __props.element,
						item: __props.item
					}, null, 8, ["element", "item"])]),
					_: 1
				}, 8, ["class"])]),
				_: 1
			})) : __props.element ? (openBlock(), createBlock(ElementRenderer_default, {
				key: 1,
				element: __props.element,
				item: __props.item
			}, null, 8, ["element", "item"])) : createCommentVNode("", true);
		};
	}
});
//#endregion
//#region src/components/compositions/cards/ElementDisplayCard.vue
var ElementDisplayCard_exports = /* @__PURE__ */ __exportAll({ default: () => ElementDisplayCard_default });
var ElementDisplayCard_default = ElementDisplayCard_vue_vue_type_script_setup_true_lang_default;
//#endregion
export { ElementDisplayCard_exports as n, ElementDisplayCard_default as t };

//# sourceMappingURL=ElementDisplayCard-Dr7gYR3X.js.map