Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`../../localization/index.cjs`),n=require(`../button/button.cjs`),r=require(`../../shared/sr_only_close_button.cjs`);let i=require(`vue`);var a={compatConfig:{MODE:3},name:`DtNoticeAction`,components:{DtIconClose:require(`@dialpad/dialtone-icons/vue3`).DtIconClose,DtButton:n.default,SrOnlyCloseButton:r.default},props:{hideClose:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1}},emits:[`close`],data(){return{i18n:new t.DialtoneLocalization}},computed:{closeButtonTitle(){return this.i18n.$t(`DIALTONE_CLOSE_BUTTON`)}},mounted(){this.hideClose||(this.lastFocusedElement=document.activeElement)},beforeUnmount(){this.lastFocusedElement?.focus()},methods:{close(){this.$emit(`close`)}}},o={class:`d-notice__actions`,"data-qa":`notice-content-actions`};function s(e,t,n,r,a,s){let c=(0,i.resolveComponent)(`dt-icon-close`),l=(0,i.resolveComponent)(`dt-button`),u=(0,i.resolveComponent)(`sr-only-close-button`);return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,o,[n.hideAction?(0,i.createCommentVNode)(``,!0):(0,i.renderSlot)(e.$slots,`default`,{key:0}),n.hideClose?((0,i.openBlock)(),(0,i.createBlock)(u,{key:2,onClose:s.close},null,8,[`onClose`])):((0,i.openBlock)(),(0,i.createBlock)(l,{key:1,ref:`closeButton`,circle:!0,"data-qa":`dt-notice-action-close-button`,importance:`clear`,size:`sm`,"aria-label":s.closeButtonTitle,title:s.closeButtonTitle,onClick:s.close},{icon:(0,i.withCtx)(()=>[(0,i.createVNode)(c,{size:`200`})]),_:1},8,[`aria-label`,`title`,`onClick`]))])}var c=e.t(a,[[`render`,s]]);exports.default=c;
//# sourceMappingURL=notice-action.cjs.map