{"version":3,"file":"actionText-fFcUPi2g-1UIVDoW6.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/actionGlobal-DqVa7c7G.mjs","../node_modules/@nextcloud/vue/dist/chunks/actionText-fFcUPi2g.mjs"],"sourcesContent":["const ActionGlobalMixin = {\n beforeUpdate() {\n this.text = this.getText();\n },\n data() {\n return {\n // $slots are not reactive.\n // We need to update the content manually\n text: this.getText()\n };\n },\n computed: {\n isLongText() {\n return this.text && this.text.trim().length > 20;\n }\n },\n methods: {\n getText() {\n return this.$slots.default ? this.$slots.default[0].text.trim() : \"\";\n }\n }\n};\nexport {\n ActionGlobalMixin as A\n};\n","import { A as ActionGlobalMixin } from \"./actionGlobal-DqVa7c7G.mjs\";\nconst GetParent = function(context, name) {\n let parent = context.$parent;\n while (parent) {\n if (parent.$options.name === name) {\n return parent;\n }\n parent = parent.$parent;\n }\n};\nconst ActionTextMixin = {\n mixins: [ActionGlobalMixin],\n props: {\n /**\n * Icon to show with the action, can be either a CSS class or an URL\n */\n icon: {\n type: String,\n default: \"\"\n },\n /**\n * The main text content of the entry.\n */\n name: {\n type: String,\n default: \"\"\n },\n /**\n * The title attribute of the element.\n */\n title: {\n type: String,\n default: \"\"\n },\n /**\n * Whether we close the Actions menu after the click\n */\n closeAfterClick: {\n type: Boolean,\n default: false\n },\n /**\n * Aria label for the button. Not needed if the button has text.\n */\n ariaLabel: {\n type: String,\n default: null\n },\n /**\n * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n * otherwise root element will inherit incorrect aria-hidden.\n */\n ariaHidden: {\n type: Boolean,\n default: null\n }\n },\n emits: [\n \"click\"\n ],\n computed: {\n /**\n * Check if icon prop is an URL\n * @return {boolean} Whether the icon prop is an URL\n */\n isIconUrl() {\n try {\n return !!new URL(this.icon, this.icon.startsWith(\"/\") ? window.location.origin : void 0);\n } catch (error) {\n return false;\n }\n }\n },\n methods: {\n onClick(event) {\n this.$emit(\"click\", event);\n if (this.closeAfterClick) {\n const parent = GetParent(this, \"NcActions\");\n if (parent && parent.closeMenu) {\n parent.closeMenu(false);\n }\n }\n }\n }\n};\nexport {\n ActionTextMixin as A\n};\n"],"names":["ActionGlobalMixin","GetParent","context","name","parent","ActionTextMixin","event"],"mappings":";MAAMA,EAAoB,CACxB,cAAe,CACb,KAAK,KAAO,KAAK,QAAS,CAC3B,EACD,MAAO,CACL,MAAO,CAGL,KAAM,KAAK,QAAO,CACnB,CACF,EACD,SAAU,CACR,YAAa,CACX,OAAO,KAAK,MAAQ,KAAK,KAAK,KAAI,EAAG,OAAS,EACpD,CACG,EACD,QAAS,CACP,SAAU,CACR,OAAO,KAAK,OAAO,QAAU,KAAK,OAAO,QAAQ,CAAC,EAAE,KAAK,KAAM,EAAG,EACxE,CACA,CACA,ECpBMC,EAAY,SAASC,EAASC,EAAM,CACxC,IAAIC,EAASF,EAAQ,QACrB,KAAOE,GAAQ,CACb,GAAIA,EAAO,SAAS,OAASD,EAC3B,OAAOC,EAETA,EAASA,EAAO,OACpB,CACA,EACMC,EAAkB,CACtB,OAAQ,CAACL,CAAiB,EAC1B,MAAO,CAIL,KAAM,CACJ,KAAM,OACN,QAAS,EACV,EAID,KAAM,CACJ,KAAM,OACN,QAAS,EACV,EAID,MAAO,CACL,KAAM,OACN,QAAS,EACV,EAID,gBAAiB,CACf,KAAM,QACN,QAAS,EACV,EAID,UAAW,CACT,KAAM,OACN,QAAS,IACV,EAMD,WAAY,CACV,KAAM,QACN,QAAS,IACf,CACG,EACD,MAAO,CACL,OACD,EACD,SAAU,CAKR,WAAY,CACV,GAAI,CACF,MAAO,CAAC,CAAC,IAAI,IAAI,KAAK,KAAM,KAAK,KAAK,WAAW,GAAG,EAAI,OAAO,SAAS,OAAS,MAAM,CACxF,MAAe,CACd,MAAO,EACf,CACA,CACG,EACD,QAAS,CACP,QAAQM,EAAO,CAEb,GADA,KAAK,MAAM,QAASA,CAAK,EACrB,KAAK,gBAAiB,CACxB,MAAMF,EAASH,EAAU,KAAM,WAAW,EACtCG,GAAUA,EAAO,WACnBA,EAAO,UAAU,EAAK,CAEhC,CACA,CACA,CACA","x_google_ignoreList":[0,1]}