import { Component, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@seniorsistemas/angular-components/tooltip";
import * as i3 from "@seniorsistemas/angular-components/switch";
import * as i4 from "../../../../components/field-label/field-label.component";
export class BooleanSwitchFieldComponent {
    field;
    formControl;
    static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BooleanSwitchFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
    static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: BooleanSwitchFieldComponent, selector: "ng-component", inputs: { field: "field", formControl: "formControl" }, ngImport: i0, template: "<s-field-label [field]=\"field\"></s-field-label>\n\n<div class=\"ui-grid ui-grid-responsive ui-grid-pad p-fluid\">\n    <div class=\"ui-grid-row\">\n        <div class=\"i-grid-col-1\">\n            <s-switch\n                [id]=\"field.id || field.name\"\n                [inputName]=\"field.name\"\n                [formControl]=\"formControl\"\n                [sTooltip]=\"field.tooltip\"\n                tooltipPosition=\"top\"\n                (valueChanged)=\"field.onChange ? field.onChange($event) : null\"\n            >\n            </s-switch>\n        </div>\n        @if (field.optionsLabel) {\n            <div class=\"i-grid-col-1\">\n                @if (formControl.value) {\n                    <span>{{ field.optionsLabel.true }}</span>\n                } @else {\n                    <span>{{ field.optionsLabel.false }}</span>\n                }\n            </div>\n        }\n    </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.TooltipDirective, selector: "[sTooltip]", inputs: ["sTooltip", "tooltipPosition", "showDelay", "displayTime", "tooltipEvent", "escape", "visible", "mobileBehavior", "focusedInputRef", "checkTruncatedText"] }, { kind: "component", type: i3.SwitchComponent, selector: "s-switch", inputs: ["readonly", "trueLabel", "falseLabel", "inputId", "inputName", "disabled", "value"], outputs: ["valueChanged"] }, { kind: "component", type: i4.FieldLabelComponent, selector: "s-field-label", inputs: ["field", "fieldContainerRef"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: BooleanSwitchFieldComponent, decorators: [{
            type: Component,
            args: [{ template: "<s-field-label [field]=\"field\"></s-field-label>\n\n<div class=\"ui-grid ui-grid-responsive ui-grid-pad p-fluid\">\n    <div class=\"ui-grid-row\">\n        <div class=\"i-grid-col-1\">\n            <s-switch\n                [id]=\"field.id || field.name\"\n                [inputName]=\"field.name\"\n                [formControl]=\"formControl\"\n                [sTooltip]=\"field.tooltip\"\n                tooltipPosition=\"top\"\n                (valueChanged)=\"field.onChange ? field.onChange($event) : null\"\n            >\n            </s-switch>\n        </div>\n        @if (field.optionsLabel) {\n            <div class=\"i-grid-col-1\">\n                @if (formControl.value) {\n                    <span>{{ field.optionsLabel.true }}</span>\n                } @else {\n                    <span>{{ field.optionsLabel.false }}</span>\n                }\n            </div>\n        }\n    </div>\n</div>\n" }]
        }], propDecorators: { field: [{
                type: Input,
                args: [{ required: true }]
            }], formControl: [{
                type: Input,
                args: [{ required: true }]
            }] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vbGVhbi1zd2l0Y2gtZmllbGQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci1jb21wb25lbnRzL2R5bmFtaWMtZm9ybS9zcmMvbGliL2R5bmFtaWMtZm9ybS9mb3JtLWZpZWxkL2ZpZWxkcy9ib29sZWFuL2Jvb2xlYW4tc3dpdGNoLWZpZWxkL2Jvb2xlYW4tc3dpdGNoLWZpZWxkLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy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