import { Component, input } from '@angular/core';
import { ButtonComponent } from '@seniorsistemas/angular-components/button';
import * as i0 from "@angular/core";
export class ButtonFieldComponent {
    field = input.required();
    clickedButton($event) {
        if (this.field().onClick) {
            this.field().onClick?.($event);
        }
    }
    handleMouseEnter() {
        if (this.field().mouseEnter) {
            this.field().mouseEnter?.(this.field());
        }
    }
    handleMouseLeave() {
        if (this.field().mouseLeave) {
            this.field().mouseLeave?.(this.field());
        }
    }
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: ButtonFieldComponent, isStandalone: true, selector: "s-button-field", inputs: { field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let _field = field();\n<section\n    [class.full-width]=\"_field.fullWidth\"\n    [class.fit-content]=\"!_field.fullWidth\"\n>\n    <s-button\n        #button\n        [label]=\"_field.label\"\n        [priority]=\"_field.priority ?? 'default'\"\n        [iconClass]=\"_field.iconClass\"\n        [disabled]=\"_field.disabled ?? false\"\n        [auxiliary]=\"_field.auxiliary ?? false\"\n        [caret]=\"_field.caret ?? false\"\n        [id]=\"_field.id\"\n        [tooltip]=\"_field.tooltip ? _field.tooltip : button.tooltip\"\n        (clicked)=\"clickedButton($event)\"\n        [iconColor]=\"_field.iconColor\"\n        [badge]=\"_field.badge\"\n        [animation]=\"_field.animation\"\n        [slide]=\"_field.slide ?? false\"\n        [menuOptions]=\"_field.menuOptions ?? []\"\n        [baseZIndex]=\"_field.baseZIndex ?? 0\"\n        [styleClass]=\"_field.styleClass ? _field.styleClass : button.styleClass\"\n        [rightIconClass]=\"_field.rightIconClass\"\n        [tooltipPosition]=\"_field.tooltipPosition ? _field.tooltipPosition : button.tooltipPosition\"\n        [type]=\"_field.type\"\n        [size]=\"_field.size\"\n        (mouseenter)=\"handleMouseEnter()\"\n        (mouseleave)=\"handleMouseLeave()\"\n    >\n    </s-button>\n</section>\n\n", styles: ["section{height:100%;display:flex;align-items:flex-end}section.full-width{width:100%}section.fit-content{width:fit-content}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor", "menuAriaLabel"], outputs: ["clicked"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonFieldComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-button-field', standalone: true, imports: [ButtonComponent], template: "@let _field = field();\n<section\n    [class.full-width]=\"_field.fullWidth\"\n    [class.fit-content]=\"!_field.fullWidth\"\n>\n    <s-button\n        #button\n        [label]=\"_field.label\"\n        [priority]=\"_field.priority ?? 'default'\"\n        [iconClass]=\"_field.iconClass\"\n        [disabled]=\"_field.disabled ?? false\"\n        [auxiliary]=\"_field.auxiliary ?? false\"\n        [caret]=\"_field.caret ?? false\"\n        [id]=\"_field.id\"\n        [tooltip]=\"_field.tooltip ? _field.tooltip : button.tooltip\"\n        (clicked)=\"clickedButton($event)\"\n        [iconColor]=\"_field.iconColor\"\n        [badge]=\"_field.badge\"\n        [animation]=\"_field.animation\"\n        [slide]=\"_field.slide ?? false\"\n        [menuOptions]=\"_field.menuOptions ?? []\"\n        [baseZIndex]=\"_field.baseZIndex ?? 0\"\n        [styleClass]=\"_field.styleClass ? _field.styleClass : button.styleClass\"\n        [rightIconClass]=\"_field.rightIconClass\"\n        [tooltipPosition]=\"_field.tooltipPosition ? _field.tooltipPosition : button.tooltipPosition\"\n        [type]=\"_field.type\"\n        [size]=\"_field.size\"\n        (mouseenter)=\"handleMouseEnter()\"\n        (mouseleave)=\"handleMouseLeave()\"\n    >\n    </s-button>\n</section>\n\n", styles: ["section{height:100%;display:flex;align-items:flex-end}section.full-width{width:100%}section.fit-content{width:fit-content}\n"] }]
        }] });
//# sourceMappingURL=data:application/json;base64, 