import { Component, ContentChildren, Input, QueryList } from '@angular/core';
import { MatLegacyMenuItem as MatMenuItem } from '@angular/material/legacy-menu';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/material/legacy-menu";
import * as i3 from "@aztrix/components/button";
import * as i4 from "@aztrix/icons";
export class MenuButtonComponent {
    constructor() {
        this.icon = 'dots-vertical';
        this.outline = false;
        this.filled = false;
        this.hasItems = false;
        this.iconButton = true;
        this.fullWidth = false;
        this.bigButton = false;
        this._open = false;
    }
    get _hasItems() {
        return this.menuItems?.length || this.hasItems;
    }
}
MenuButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: MenuButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
MenuButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.5", type: MenuButtonComponent, selector: "ax-menu-button", inputs: { icon: "icon", outline: "outline", filled: "filled", hasItems: "hasItems", iconButton: "iconButton", fullWidth: "fullWidth", bigButton: "bigButton", color: "color" }, queries: [{ propertyName: "menuItems", predicate: MatMenuItem }], ngImport: i0, template: "<mat-menu #menu=\"matMenu\" [classList]=\"fullWidth ? 'menu-panel-equal-width' : null\">\n  <ng-content></ng-content>\n</mat-menu>\n\n<button\n  *ngIf=\"_hasItems\"\n  axButton\n  class=\"menu-button cy-menu\"\n  [icon-button]=\"iconButton\"\n  [fullWidth]=\"fullWidth\"\n  [ngClass]=\"{open: _open}\"\n  [outline]=\"outline\"\n  [filled]=\"filled\"\n  [bigButton]=\"bigButton\"\n  [color]=\"color\"\n  [matMenuTriggerFor]=\"menu\"\n  (menuOpened)=\"_open = true\"\n  (menuClosed)=\"_open = false\"\n>\n  <ax-icon class=\"icon\" [name]=\"icon\"></ax-icon>\n  <ng-content select=\".menu-label\"></ng-content>\n</button>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatLegacyMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i2.MatLegacyMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i3.ButtonDirective, selector: "[axButton]", inputs: ["color", "labelHideMobile", "smallButton", "bigButton", "fullWidth", "filled", "outline", "icon-button", "hoverLabel", "hover", "lowercase", "disabled"] }, { kind: "component", type: i4.IconComponent, selector: "ax-icon", inputs: ["name", "inline"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.5", ngImport: i0, type: MenuButtonComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-menu-button', template: "<mat-menu #menu=\"matMenu\" [classList]=\"fullWidth ? 'menu-panel-equal-width' : null\">\n  <ng-content></ng-content>\n</mat-menu>\n\n<button\n  *ngIf=\"_hasItems\"\n  axButton\n  class=\"menu-button cy-menu\"\n  [icon-button]=\"iconButton\"\n  [fullWidth]=\"fullWidth\"\n  [ngClass]=\"{open: _open}\"\n  [outline]=\"outline\"\n  [filled]=\"filled\"\n  [bigButton]=\"bigButton\"\n  [color]=\"color\"\n  [matMenuTriggerFor]=\"menu\"\n  (menuOpened)=\"_open = true\"\n  (menuClosed)=\"_open = false\"\n>\n  <ax-icon class=\"icon\" [name]=\"icon\"></ax-icon>\n  <ng-content select=\".menu-label\"></ng-content>\n</button>\n" }]
        }], propDecorators: { icon: [{
                type: Input
            }], outline: [{
                type: Input
            }], filled: [{
                type: Input
            }], hasItems: [{
                type: Input
            }], iconButton: [{
                type: Input
            }], fullWidth: [{
                type: Input
            }], bigButton: [{
                type: Input
            }], color: [{
                type: Input
            }], menuItems: [{
                type: ContentChildren,
                args: [MatMenuItem]
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxl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