{"version":3,"file":"workspace-action-menu.element-C5kKrSZf.js","sources":["../../../src/packages/core/workspace/components/workspace-action-menu/workspace-action-menu.element.ts"],"sourcesContent":["import { css, html, customElement, property, state, nothing, repeat } from '@umbraco-cms/backoffice/external/lit';\nimport { UmbTextStyles } from '@umbraco-cms/backoffice/style';\nimport type { ManifestWorkspaceActionMenuItem } from '@umbraco-cms/backoffice/extension-registry';\nimport { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';\nimport type { UUIInterfaceColor, UUIInterfaceLook } from '@umbraco-cms/backoffice/external/uui';\nimport type { UmbExtensionElementAndApiInitializer } from '@umbraco-cms/backoffice/extension-api';\n\n@customElement('umb-workspace-action-menu')\nexport class UmbWorkspaceActionMenuElement extends UmbLitElement {\n\t@property()\n\tlook: UUIInterfaceLook = 'secondary';\n\n\t@property()\n\tcolor: UUIInterfaceColor = 'default';\n\n\t@property({ type: Array, attribute: false })\n\titems: Array> = [];\n\n\t@state()\n\t_popoverOpen = false;\n\n\t#onPopoverToggle(event: ToggleEvent) {\n\t\t// TODO: This ignorer is just neede for JSON SCHEMA TO WORK, As its not updated with latest TS jet.\n\t\t// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n\t\t// @ts-ignore\n\t\tthis._popoverOpen = event.newState === 'open';\n\t}\n\n\toverride render() {\n\t\treturn this.items?.length\n\t\t\t? html`\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t${repeat(\n\t\t\t\t\t\t\t\t\tthis.items,\n\t\t\t\t\t\t\t\t\t(ext) => ext.alias,\n\t\t\t\t\t\t\t\t\t(ext) => ext.component,\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t`\n\t\t\t: nothing;\n\t}\n\n\tstatic override styles = [\n\t\tUmbTextStyles,\n\t\tcss`\n\t\t\t:host {\n\t\t\t\t--uui-menu-item-flat-structure: 1;\n\t\t\t}\n\n\t\t\t#expand-symbol {\n\t\t\t\t/* TODO: remove this hack and use a proper UUI symbol for this */\n\t\t\t\ttransform: rotate(-90deg);\n\t\t\t}\n\n\t\t\t#expand-symbol[open] {\n\t\t\t\ttransform: rotate(0deg);\n\t\t\t}\n\n\t\t\t#workspace-action-popover {\n\t\t\t\tmin-width: 200px;\n\t\t\t}\n\n\t\t\t#popover-trigger {\n\t\t\t\t--uui-button-padding-top-factor: 0;\n\t\t\t\t--uui-button-padding-bottom-factor: 0.125;\n\t\t\t}\n\t\t`,\n\t];\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'umb-workspace-action-menu': UmbWorkspaceActionMenuElement;\n\t}\n}\n"],"names":["_UmbWorkspaceActionMenuElement_instances","onPopoverToggle_fn","UmbWorkspaceActionMenuElement","UmbLitElement","__privateAdd","html","__privateMethod","repeat","ext","nothing","event","UmbTextStyles","css","__decorateClass","property","state","customElement"],"mappings":";;;;;;;;;8OAAAA,GAAAC;AAQa,IAAAC,IAAN,cAA4CC,EAAc;AAAA,EAA1D,cAAA;AAAA,UAAA,GAAA,SAAA,GAAAC,EAAA,MAAAJ,CAAA,GAEmB,KAAA,OAAA,aAGE,KAAA,QAAA,WAG3B,KAAA,QAAsF,IAGvE,KAAA,eAAA;AAAA,EAAA;AAAA,EASN,SAAS;AACV,WAAA,KAAK,OAAO,SAChBK;AAAA;AAAA;AAAA;AAAA,cAIS,KAAK,IAAI;AAAA,eACR,KAAK,KAAK;AAAA,cACX,KAAK,SAAS,KAAK,+BAA+B,CAAC;AAAA;AAAA,oDAEb,KAAK,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAMrDC,QAAKN,GAAgBC,CAAA,CAAA;AAAA;AAAA;AAAA,UAG3BM;AAAA,MACD,KAAK;AAAA,MACL,CAACC,MAAQA,EAAI;AAAA,MACb,CAACA,MAAQA,EAAI;AAAA,IAAA,CACb;A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