(self.webpackChunkncpasswords=self.webpackChunkncpasswords||[]).push([[8312],{5382(t,e,i){"use strict";i.r(e),i.d(e,{default:()=>s});const s={}},84793(t,e,i){var s=i(5382);s.__esModule&&(s=s.default),"string"==typeof s&&(s=[[t.id,s,""]]),s.locals&&(t.exports=s.locals),(0,i(70534).A)("77f20aca",s,!1,{})},57505(t,e,i){"use strict";i.r(e),i.d(e,{default:()=>s.N});var s=i(42459)},42459(t,e,i){"use strict";i.d(e,{N:()=>r}),i(84793);var s=i(66129),n=i(63391),a=i(97424),o=i(51431);const l={name:"NcActionButton",components:{NcIconSvgWrapper:n.N},mixins:[a.A],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{ariaHidden:{type:Boolean,default:null},disabled:{type:Boolean,default:!1},isMenu:{type:Boolean,default:!1},type:{type:String,default:"button",validator:t=>["button","checkbox","radio","reset","submit"].includes(t)},modelValue:{type:[Boolean,String],default:null},value:{type:String,default:null},description:{type:String,default:""}},setup:()=>({mdiCheck:s.a,mdiChevronRight:s.m}),computed:{isFocusable(){return!this.disabled},isChecked(){return"radio"===this.type&&"boolean"!=typeof this.modelValue?this.modelValue===this.value:this.modelValue},nativeType(){return"submit"===this.type||"reset"===this.type?this.type:"button"},buttonAttributes(){const t={};return this.isInSemanticMenu?(t.role="menuitem","radio"===this.type?(t.role="menuitemradio",t["aria-checked"]=this.isChecked?"true":"false"):("checkbox"===this.type||"button"===this.nativeType&&null!==this.modelValue)&&(t.role="menuitemcheckbox",t["aria-checked"]=null===this.modelValue?"mixed":this.modelValue?"true":"false")):null!==this.modelValue&&"button"===this.nativeType&&(t["aria-pressed"]=this.modelValue?"true":"false"),t}},methods:{handleClick(t){this.onClick(t),null===this.modelValue&&"button"===this.type||("radio"===this.type&&"boolean"!=typeof this.modelValue?this.isChecked||this.$emit("update:modelValue",this.value):this.$emit("update:modelValue",!this.isChecked))}}};var c=function(){var t=this,e=t._self._c;return e("li",{staticClass:"action",class:{"action--disabled":t.disabled},attrs:{role:t.isInSemanticMenu&&"presentation"}},[e("button",t._b({staticClass:"action-button button-vue",class:{"action-button--active":t.isChecked,focusable:t.isFocusable},attrs:{"aria-label":t.ariaLabel,disabled:t.disabled,title:t.title,type:t.nativeType},on:{click:t.handleClick}},"button",t.buttonAttributes,!1),[t._t("icon",function(){return[e("span",{staticClass:"action-button__icon",class:[t.isIconUrl?"action-button__icon--url":t.icon],style:{backgroundImage:t.isIconUrl?`url(${t.icon})`:null},attrs:{"aria-hidden":"true"}})]}),e("span",{staticClass:"action-button__longtext-wrapper"},[t.name?e("strong",{staticClass:"action-button__name"},[t._v(" "+t._s(t.name)+" ")]):t._e(),t.isLongText?e("span",{staticClass:"action-button__longtext",domProps:{textContent:t._s(t.text)}}):e("span",{staticClass:"action-button__text"},[t._v(" "+t._s(t.text)+" ")]),t.description?e("span",{staticClass:"action-button__description",domProps:{textContent:t._s(t.description)}}):t._e()]),t.isMenu?e("NcIconSvgWrapper",{staticClass:"action-button__menu-icon",attrs:{directional:"",path:t.mdiChevronRight}}):t.isChecked?e("NcIconSvgWrapper",{staticClass:"action-button__pressed-icon",attrs:{path:t.mdiCheck}}):!1===t.isChecked?e("span",{staticClass:"action-button__pressed-icon material-design-icon"}):t._e(),t._e()],2)])},u=[];const r=(0,o.n)(l,c,u,!1,null,"5b4c6c71").exports},16086(t,e,i){"use strict";i.d(e,{A:()=>s});const s={beforeUpdate(){this.text=this.getText()},data(){return{text:this.getText()}},computed:{isLongText(){return this.text&&this.text.trim().length>20}},methods:{getText(){return this.$slots.default?this.$slots.default[0].text.trim():""}}}},97424(t,e,i){"use strict";i.d(e,{A:()=>s});const s={mixins:[i(16086).A],props:{icon:{type:String,default:""},name:{type:String,default:""},title:{type:String,default:""},closeAfterClick:{type:Boolean,default:!1},ariaLabel:{type:String,default:null},ariaHidden:{type:Boolean,default:null}},emits:["click"],computed:{isIconUrl(){try{return!!new URL(this.icon,this.icon.startsWith("/")?window.location.origin:void 0)}catch{return!1}}},methods:{onClick(t){if(this.$emit("click",t),this.closeAfterClick){const t=function(t){let e=t.$parent;for(;e;){if("NcActions"===e.$options.name)return e;e=e.$parent}}(this);t&&t.closeMenu&&t.closeMenu(!1)}}}}}}]);