Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/utils/index.cjs`),t=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),n=require(`../../localization/index.cjs`),r=require(`../button/button.cjs`);let i=require(`vue`),a=require(`@dialpad/dialtone-icons/vue3`);var o={compatConfig:{MODE:3},name:`PopoverHeaderFooter`,components:{DtButton:r.default,DtIconClose:a.DtIconClose},props:{type:{type:String,validator:function(e){return[`header`,`footer`].includes(e)}},contentClass:{type:[String,Array,Object],default:``},showCloseButton:{type:Boolean,default:!1}},emits:[`close`],data(){return{hasSlotContent:e.hasSlotContent,i18n:new n.DialtoneLocalization}},computed:{closeButtonTitle(){return this.i18n.$t(`DIALTONE_CLOSE_BUTTON`)}},methods:{focusCloseButton(){e.returnFirstEl(this.$refs[`popover__close-button`]?.$el)?.focus()}}};function s(e,t,n,r,a,o){let s=(0,i.resolveComponent)(`dt-icon-close`),c=(0,i.resolveComponent)(`dt-button`);return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,{"data-qa":`dt-popover-header-footer`,class:(0,i.normalizeClass)({"d-popover__header":n.type===`header`,"d-popover__footer":n.type===`footer`})},[a.hasSlotContent(e.$slots.content)?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,{key:0,"data-qa":`dt-popover-header-footer-content`,class:(0,i.normalizeClass)([{"d-popover__header__content":n.type===`header`,"d-popover__footer__content":n.type===`footer`},n.contentClass])},[(0,i.renderSlot)(e.$slots,`content`)],2)):(0,i.createCommentVNode)(``,!0),n.showCloseButton?((0,i.openBlock)(),(0,i.createBlock)(c,{key:1,ref:`popover__close-button`,"data-qa":`dt-popover-close`,class:(0,i.normalizeClass)({"d-popover__header__close-button":n.type===`header`,"d-popover__footer__close-button":n.type===`footer`}),importance:`outlined`,kind:`muted`,circle:``,"aria-label":o.closeButtonTitle,title:o.closeButtonTitle,onClick:t[0]||(t[0]=t=>e.$emit(`close`))},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(s,{size:`300`})]),_:1},8,[`class`,`aria-label`,`title`])):(0,i.createCommentVNode)(``,!0)],2)}var c=t.t(o,[[`render`,s]]);exports.default=c;
//# sourceMappingURL=popover-header-footer.cjs.map