import { AXButtonComponent } from '@acorex/components/button';
import { AXDecoratorModule } from '@acorex/components/decorators';
import * as i0 from '@angular/core';
import { input, output, ChangeDetectionStrategy, ViewEncapsulation, Component, inject } from '@angular/core';
import * as i1 from '@acorex/components/popover';
import { AXPopoverModule } from '@acorex/components/popover';

class AXFabComponent {
    constructor() {
        this.label = input(null, ...(ngDevMode ? [{ debugName: "label" }] : []));
        this.popupStyle = input('bubble', ...(ngDevMode ? [{ debugName: "popupStyle" }] : []));
        this.popupPlacement = input('top', ...(ngDevMode ? [{ debugName: "popupPlacement" }] : []));
        /**
         *  Fires each time the user clicks the button.
         *  @event
         */
        this.onClick = output();
        /**
         * Emits when the popover is opened.
         * @event
         */
        this.onOpened = output();
        /**
         * Emits when the popover is closed.
         * @event
         */
        this.onClosed = output();
    }
    openPopover() {
        this.onOpened.emit({ component: this });
    }
    closePopover() {
        this.onClosed.emit({ component: this });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFabComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.3", type: AXFabComponent, isStandalone: true, selector: "ax-fab", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, popupStyle: { classPropertyName: "popupStyle", publicName: "popupStyle", isSignal: true, isRequired: false, transformFunction: null }, popupPlacement: { classPropertyName: "popupPlacement", publicName: "popupPlacement", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick", onOpened: "onOpened", onClosed: "onClosed" }, ngImport: i0, template: "<ax-button #btn (onClick)=\"onClick.emit($event)\" color=\"primary\" look=\"solid\" [text]=\"label()\">\n  <ng-content select=\"ax-icon\"> </ng-content>\n</ax-button>\n\n<ax-popover\n  (onOpened)=\"openPopover()\"\n  (onClosed)=\"closePopover()\"\n  [disablePanelClass]=\"popupStyle() === 'bubble' ? true : false\"\n  [offsetY]=\"-6\"\n  [placement]=\"popupPlacement()\"\n  [target]=\"btn\"\n>\n  <div class=\"ax-fab-item-container\">\n    <ng-content select=\"ax-fab-item\"> </ng-content>\n  </div>\n</ax-popover>\n", styles: ["ax-fab ax-button{border-radius:1000vmax}.ax-fab-item-container{display:flex;flex-direction:column;gap:.5rem}.ax-fab-item-container ax-popover{display:none}.ax-fab-item-container ax-button{border-radius:1000vmax}\n"], dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i1.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "repositionOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXDecoratorModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFabComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-fab', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXButtonComponent, AXPopoverModule, AXDecoratorModule], template: "<ax-button #btn (onClick)=\"onClick.emit($event)\" color=\"primary\" look=\"solid\" [text]=\"label()\">\n  <ng-content select=\"ax-icon\"> </ng-content>\n</ax-button>\n\n<ax-popover\n  (onOpened)=\"openPopover()\"\n  (onClosed)=\"closePopover()\"\n  [disablePanelClass]=\"popupStyle() === 'bubble' ? true : false\"\n  [offsetY]=\"-6\"\n  [placement]=\"popupPlacement()\"\n  [target]=\"btn\"\n>\n  <div class=\"ax-fab-item-container\">\n    <ng-content select=\"ax-fab-item\"> </ng-content>\n  </div>\n</ax-popover>\n", styles: ["ax-fab ax-button{border-radius:1000vmax}.ax-fab-item-container{display:flex;flex-direction:column;gap:.5rem}.ax-fab-item-container ax-popover{display:none}.ax-fab-item-container ax-button{border-radius:1000vmax}\n"] }]
        }] });

class AXFabItemComponent {
    constructor() {
        this.label = input(null, ...(ngDevMode ? [{ debugName: "label" }] : []));
        this.parent = inject(AXFabComponent);
        /**
         *  Fires each time the user clicks the button.
         *  @event
         */
        this.onClick = output();
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFabItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.3", type: AXFabItemComponent, isStandalone: true, selector: "ax-fab-item", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onClick: "onClick" }, ngImport: i0, template: "<ax-button\n  [text]=\"label()\"\n  (onClick)=\"onClick.emit($event)\"\n  class=\"ax-sm\"\n  [look]=\"parent.popupStyle() === 'bubble' ? 'solid' : 'blank'\"\n>\n  <ng-content select=\"ax-icon\"> </ng-content>\n</ax-button>\n", dependencies: [{ kind: "component", type: AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImport: i0, type: AXFabItemComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-fab-item', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXButtonComponent, AXDecoratorModule], template: "<ax-button\n  [text]=\"label()\"\n  (onClick)=\"onClick.emit($event)\"\n  class=\"ax-sm\"\n  [look]=\"parent.popupStyle() === 'bubble' ? 'solid' : 'blank'\"\n>\n  <ng-content select=\"ax-icon\"> </ng-content>\n</ax-button>\n" }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { AXFabComponent, AXFabItemComponent };
//# sourceMappingURL=acorex-components-fab.mjs.map
