Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/utils/index.cjs`),t=require(`../stack/stack.cjs`),n=require(`./empty-state-constants.cjs`);let r=require(`vue`);var i={key:0,class:`d-empty-state__illustration`},a={key:1,class:`d-empty-state__icon`},o={__name:`empty_state`,props:{size:{type:String,default:`lg`,validator:e=>Object.keys(n.EMPTY_STATE_SIZE_MODIFIERS).includes(e)},headerText:{type:String,required:!0},bodyText:{type:String,default:null}},setup(o){let s=(0,r.useSlots)(),c=o,l=(0,r.computed)(()=>e.hasSlotContent(s.icon)),u=(0,r.computed)(()=>e.hasSlotContent(s.illustration)),d=(0,r.computed)(()=>c.size===`sm`),f=(0,r.computed)(()=>l.value&&(!u.value||d.value)),p=(0,r.computed)(()=>u.value&&!d.value),m=(0,r.computed)(()=>n.EMPTY_STATE_SIZE_MODIFIERS[c.size]),h=(0,r.computed)(()=>[`d-empty-state`,m.value]),g=(0,r.computed)(()=>n.EMPTY_STATE_CONTENT_SIZE_MODIFIERS[c.size]),_=(0,r.computed)(()=>n.EMPTY_STATE_HEADLINE_SIZE_MODIFIERS[c.size]),v=(0,r.computed)(()=>n.EMPTY_STATE_BODY_SIZE_MODIFIERS[c.size]);return(0,r.onMounted)(()=>{!c.bodyText&&!e.hasSlotContent(s.body)&&console.error(`DtEmptyState: You should provide either bodyText or content on body slot.`)}),(e,n)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(t.default),{class:(0,r.normalizeClass)(h.value)},{default:(0,r.withCtx)(()=>[p.value?((0,r.openBlock)(),(0,r.createElementBlock)(`span`,i,[(0,r.renderSlot)(e.$slots,`illustration`)])):(0,r.createCommentVNode)(``,!0),f.value?((0,r.openBlock)(),(0,r.createElementBlock)(`span`,a,[(0,r.renderSlot)(e.$slots,`icon`,{iconSize:`800`})])):(0,r.createCommentVNode)(``,!0),(0,r.createVNode)((0,r.unref)(t.default),{gap:`450`,class:(0,r.normalizeClass)([`d-empty-state__content`,g.value])},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`div`,{class:(0,r.normalizeClass)([`d-empty-state__header-text`,_.value])},(0,r.toDisplayString)(o.headerText),3),o.bodyText?((0,r.openBlock)(),(0,r.createElementBlock)(`p`,{key:0,class:(0,r.normalizeClass)([`d-empty-state__body-text`,v.value])},(0,r.toDisplayString)(o.bodyText),3)):(0,r.createCommentVNode)(``,!0)]),_:1},8,[`class`]),(0,r.renderSlot)(e.$slots,`body`)]),_:3},8,[`class`]))}};exports.default=o;
//# sourceMappingURL=empty-state.cjs.map