import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@seniorsistemas/angular-components/button";
export class ButtonFieldComponent {
    field;
    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: "14.0.0", version: "18.2.14", type: ButtonFieldComponent, selector: "s-button-field", inputs: { field: "field" }, ngImport: i0, template: "<section [class.full-width]=\"field.fullWidth\" [class.fit-content]=\"!field.fullWidth\">\n    <s-button\n        #button\n        [label]=\"field.label\"\n        [priority]=\"field.priority\"\n        [iconClass]=\"field.iconClass\"\n        [disabled]=\"field.disabled\"\n        [auxiliary]=\"field.auxiliary\"\n        [caret]=\"field.caret\"\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\"\n        [menuOptions]=\"field.menuOptions\"\n        [baseZIndex]=\"field.baseZIndex\"\n        [styleClass]=\"field.styleClass ? field.styleClass : button.styleClass\"\n        [rightIconClass]=\"field.rightIconClass\"\n        [tooltipPosition]=\"field.tooltipPosition ? field.tooltipPosition : button.tooltipPosition\"\n        [type]=\"field.buttonType\"\n        [size]=\"field.buttonSize\"\n        (mouseenter)=\"handleMouseEnter()\"\n        (mouseleave)=\"handleMouseLeave()\">\n    </s-button>\n</section>\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: i1.ButtonComponent, selector: "s-button", inputs: ["id", "label", "tooltip", "tooltipPosition", "iconClass", "rightIconClass", "caret", "styleClass", "baseZIndex", "disabled", "auxiliary", "type", "priority", "menuOptions", "size", "slide", "animation", "badge", "iconColor"], outputs: ["clicked"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ButtonFieldComponent, decorators: [{
            type: Component,
            args: [{ selector: 's-button-field', template: "<section [class.full-width]=\"field.fullWidth\" [class.fit-content]=\"!field.fullWidth\">\n    <s-button\n        #button\n        [label]=\"field.label\"\n        [priority]=\"field.priority\"\n        [iconClass]=\"field.iconClass\"\n        [disabled]=\"field.disabled\"\n        [auxiliary]=\"field.auxiliary\"\n        [caret]=\"field.caret\"\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\"\n        [menuOptions]=\"field.menuOptions\"\n        [baseZIndex]=\"field.baseZIndex\"\n        [styleClass]=\"field.styleClass ? field.styleClass : button.styleClass\"\n        [rightIconClass]=\"field.rightIconClass\"\n        [tooltipPosition]=\"field.tooltipPosition ? field.tooltipPosition : button.tooltipPosition\"\n        [type]=\"field.buttonType\"\n        [size]=\"field.buttonSize\"\n        (mouseenter)=\"handleMouseEnter()\"\n        (mouseleave)=\"handleMouseLeave()\">\n    </s-button>\n</section>\n", styles: ["section{height:100%;display:flex;align-items:flex-end}section.full-width{width:100%}section.fit-content{width:fit-content}\n"] }]
        }], propDecorators: { field: [{
                type: Input,
                args: [{ required: true }]
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnV0dG9uLWZpZWxkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4u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