var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { UmbDefaultMenuItemContext } from '../menu-item/menu-item.context.js';
import { UmbDefaultMenuContext } from './menu.context.js';
import { html, customElement, property } from '../../../../../external/lit/index.js';
import { UmbLitElement } from '../../../lit-element/index.js';
import '../menu-item/menu-item-default.element.js';
let UmbMenuElement = class UmbMenuElement extends UmbLitElement {
    get expansion() {
        return this.#context.expansion.getExpansion();
    }
    set expansion(value) {
        this.#context.expansion.setExpansion(value);
    }
    #context = new UmbDefaultMenuContext(this);
    render() {
        //TODO: We should probably have resolved the MENU ITEM CONTEXT not by providing it not as an API, currently this work cause menu items does not have APIs as of their manifest. But if they do this, this would be a problem. [NL]
        return html `
			<umb-extension-with-api-slot
				type="menuItem"
				default-element="umb-menu-item-default"
				.defaultApi=${UmbDefaultMenuItemContext}
				.filter=${(items) => items.meta.menus.includes(this.manifest.alias)}>
			</umb-extension-with-api-slot>
		`;
    }
};
__decorate([
    property({ attribute: false })
], UmbMenuElement.prototype, "manifest", void 0);
UmbMenuElement = __decorate([
    customElement('umb-menu')
], UmbMenuElement);
export { UmbMenuElement };
export default UmbMenuElement;
