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 { UmbTiptapToolbarMenuElement } from '../../../components/toolbar/tiptap-toolbar-menu.element.js';
import { customElement, html, ifDefined, when } from '../../../../../external/lit/index.js';
import './table-insert.element.js';
let UmbTiptapTableToolbarMenuElement = class UmbTiptapTableToolbarMenuElement extends UmbTiptapToolbarMenuElement {
    render() {
        const label = this.localize.string(this.manifest?.meta.label);
        return html `
			${when(this.isActive, () => html `
					<uui-button compact look="outline" label=${ifDefined(label)} title=${label} popovertarget="popover-menu">
						${when(this.manifest?.meta.icon, (icon) => html `<umb-icon name=${icon}></umb-icon>`, () => html `<span>${label}</span>`)}
						<uui-symbol-expand slot="extra" open></uui-symbol-expand>
					</uui-button>
				`, () => html `
					<uui-button compact look="default" label=${ifDefined(label)} title=${label} popovertarget="popover-insert">
						${when(this.manifest?.meta.icon, (icon) => html `<umb-icon name=${icon}></umb-icon>`, () => html `<span>${label}</span>`)}
						<uui-symbol-expand slot="extra" open></uui-symbol-expand>
					</uui-button>
				`)}
			${this.renderMenu()}
			<uui-popover-container id="popover-insert" style="box-shadow: var(--uui-shadow-depth-3);">
				<umb-tiptap-table-insert .editor=${this.editor}></umb-tiptap-table-insert>
			</uui-popover-container>
		`;
    }
};
UmbTiptapTableToolbarMenuElement = __decorate([
    customElement('umb-tiptap-table-toolbar-menu')
], UmbTiptapTableToolbarMenuElement);
export { UmbTiptapTableToolbarMenuElement };
export { UmbTiptapTableToolbarMenuElement as element };
