{"version":3,"file":"NcChip-B71t2Ny2-efwz32oA.chunk.mjs","sources":["../node_modules/@nextcloud/vue/dist/chunks/NcChip-B71t2Ny2.mjs"],"sourcesContent":["import '../assets/NcChip-DbSI4mFP.css';\nimport { defineComponent, useSlots, computed, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, createBlock, renderSlot, createTextVNode, toDisplayString, withCtx, createVNode, unref } from \"vue\";\nimport { b as mdiClose } from \"./mdi-CpchYUUV.mjs\";\nimport { N as NcActionButton } from \"./NcActionButton-DNXoAooH.mjs\";\nimport { N as NcActions } from \"./NcActions-BWDsG06k.mjs\";\nimport { N as NcIconSvgWrapper } from \"./NcIconSvgWrapper-BvLanNaW.mjs\";\nimport { r as register, A as t19, a as t } from \"./_l10n-Dq_eYxz_.mjs\";\nimport { _ as _export_sfc } from \"./_plugin-vue_export-helper-1tPrXgE0.mjs\";\nregister(t19);\nconst _hoisted_1 = {\n key: 0,\n class: \"nc-chip__icon\"\n};\nconst _hoisted_2 = { class: \"nc-chip__text\" };\nconst _sfc_main = /* @__PURE__ */ defineComponent({\n __name: \"NcChip\",\n props: {\n ariaLabelClose: { default: t(\"Close\") },\n actionsContainer: { default: \"body\" },\n text: { default: \"\" },\n iconPath: { default: void 0 },\n iconSvg: { default: void 0 },\n noClose: { type: Boolean },\n variant: { default: \"secondary\" }\n },\n emits: [\"close\"],\n setup(__props, { emit: __emit }) {\n const props = __props;\n const emit = __emit;\n const slots = useSlots();\n const canClose = computed(() => !props.noClose);\n const hasActions = () => !!slots.actions;\n const hasIcon = () => Boolean(props.iconPath || props.iconSvg || !!slots.icon);\n return (_ctx, _cache) => {\n return openBlock(), createElementBlock(\"div\", {\n class: normalizeClass([\"nc-chip\", {\n [`nc-chip--${_ctx.variant}`]: true,\n \"nc-chip--no-actions\": _ctx.noClose && !hasActions(),\n \"nc-chip--no-icon\": !hasIcon()\n }])\n }, [\n hasIcon() ? (openBlock(), createElementBlock(\"span\", _hoisted_1, [\n renderSlot(_ctx.$slots, \"icon\", {}, () => [\n _ctx.iconPath || _ctx.iconSvg ? (openBlock(), createBlock(NcIconSvgWrapper, {\n key: 0,\n inline: \"\",\n path: _ctx.iconPath,\n svg: _ctx.iconPath ? void 0 : _ctx.iconSvg,\n size: 18\n }, null, 8, [\"path\", \"svg\"])) : createCommentVNode(\"\", true)\n ], true)\n ])) : createCommentVNode(\"\", true),\n createElementVNode(\"span\", _hoisted_2, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n createTextVNode(toDisplayString(_ctx.text), 1)\n ], true)\n ]),\n canClose.value || hasActions() ? (openBlock(), createBlock(NcActions, {\n key: 1,\n class: \"nc-chip__actions\",\n container: _ctx.actionsContainer,\n forceMenu: !canClose.value,\n variant: \"tertiary-no-background\"\n }, {\n default: withCtx(() => [\n canClose.value ? (openBlock(), createBlock(NcActionButton, {\n key: 0,\n closeAfterClick: \"\",\n onClick: _cache[0] || (_cache[0] = ($event) => emit(\"close\"))\n }, {\n icon: withCtx(() => [\n createVNode(NcIconSvgWrapper, {\n path: unref(mdiClose),\n size: 20\n }, null, 8, [\"path\"])\n ]),\n default: withCtx(() => [\n createTextVNode(\" \" + toDisplayString(_ctx.ariaLabelClose), 1)\n ]),\n _: 1\n })) : createCommentVNode(\"\", true),\n renderSlot(_ctx.$slots, \"actions\", {}, void 0, true)\n ]),\n _: 3\n }, 8, [\"container\", \"forceMenu\"])) : createCommentVNode(\"\", true)\n ], 2);\n };\n }\n});\nconst NcChip = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"__scopeId\", \"data-v-8f5d3c40\"]]);\nexport {\n NcChip as N\n};\n//# sourceMappingURL=NcChip-B71t2Ny2.mjs.map\n"],"names":["register","t19","_hoisted_1","_hoisted_2","_sfc_main","defineComponent","t","__props","__emit","props","emit","slots","useSlots","canClose","computed","hasActions","hasIcon","_ctx","_cache","openBlock","createElementBlock","normalizeClass","renderSlot","createBlock","NcIconSvgWrapper","createCommentVNode","createElementVNode","createTextVNode","toDisplayString","N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