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