/*! third party licenses: js/vendor.LICENSE.txt */
const n={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():""}}},o=function(i,t){let e=i.$parent;for(;e;){if(e.$options.name===t)return e;e=e.$parent}},s={mixins:[n],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(i){if(this.$emit("click",i),this.closeAfterClick){const t=o(this,"NcActions");t&&t.closeMenu&&t.closeMenu(!1)}}}};export{s as A,n as a};
