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