/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
 */
import * as tslib_1 from "tslib";
import { Component } from '@angular/core';
import { ControlContainer, NgForm } from '@angular/forms';
import { FVAbstractControl } from '../../../shared/abstract-control.component';
import { ProcessService } from '../../../../services/process.service';
var FVControlsToggleComponent = /** @class */ (function (_super) {
    tslib_1.__extends(FVControlsToggleComponent, _super);
    function FVControlsToggleComponent(process) {
        var _this = _super.call(this, process) || this;
        _this.process = process;
        return _this;
    }
    /**
     * @return {?}
     */
    FVControlsToggleComponent.prototype.ngAfterViewInit = /**
     * @return {?}
     */
    function () {
        _super.prototype.AfterViewInit.call(this);
    };
    FVControlsToggleComponent.decorators = [
        { type: Component, args: [{
                    selector: 'fv-controls-toggle',
                    template: "<div *ngIf=\"control\" class=\"controlBox\" [attr.id]=\"'control-' + control.referenceName\">\n  <i *ngIf=\"buttonsDebug\" (click)=\"debugStatus =! debugStatus\" class=\"fa fa-stethoscope\"></i>\n\n  <i *ngIf=\"tooltip\" class=\"fa fa-question-circle\" [tooltip]=\"tooltip | ltranslate\" container=\"body\" placement=\"top\"></i>\n  <div *ngIf=\"debugStatus\" [innerText]=\"debugText()\"></div>\n  <div class=\"input-group\">\n    <div class=\"switch\">\n      <input [attr.id]=\"'input-' + control.referenceName\" [name]=\"control?.key\" ngModel [disabled]=\"disabled\"\n        [readonly]=\"isReadOnly ? true : null\" [required]=\"control?.isRequired ? true : null\" class=\"cmn-toggle cmn-toggle-round-flat\"\n        type=\"checkbox\">\n      <ng-container *ngIf=\"!hideLabel\">\n        <label [attr.for]=\"'input-' + control.referenceName\"></label>\n        <span [attr.id]=\"'label-' + control.referenceName\">{{ control?.label | ltranslate }}</span>\n        <span *ngIf=\"control?.isRequired\" class=\"required px-3\">*</span>\n      </ng-container>\n      <fv-controls-validator *ngIf=\"group?.controls[control.key]\" [FVFormControl]=\"group?.controls[control.key]\"\n        [group]=\"group\" [control]=\"control\" [task]=\"task\" [tabIndex]=\"tabIndex\"></fv-controls-validator>\n    </div>\n  </div>\n</div>",
                    viewProviders: [{ provide: ControlContainer, useExisting: NgForm }],
                    styles: [".col{display:inline-flex;flex-basis:0;flex-grow:1;max-width:100%;min-width:50%}.col fv-form-tab{padding:0 5px;display:block;width:100%}.col fv-form-tab .controls-row{margin:0;padding:0}.col fv-form-tab div{max-width:100%}.columns-0,.columns-1{width:100%;min-width:100%;max-width:100%}.columns-2{width:50%;min-width:50%;max-width:50%}.columns-3{width:33.33%;max-width:33.33%;min-width:33.33%}.columns-4{width:25%;max-width:25%;min-width:25%}.controlBox .input-group{display:inline-flex;width:100%;margin-top:5px}.controlBox>.input-group>button:not(.input-group-addon),.controlBox>.input-group>input,.controlBox>.input-group>select{height:40px!important;width:100%;padding:10px}.controlBox .input-group button.input-group-addon{position:relative;width:35px;height:40px}.controlBox .input-group span.controlName{color:red}.controlBox .input-group button.input-group-addon i{position:absolute;top:10px;bottom:0;left:0;right:0}.has-text-centered,.table,.table thead th{text-align:center}.gridForm{width:100%;padding:0;margin:0 0 10px}.gridForm .input-group>.form-control{max-width:50%;border-radius:unset;margin-right:10px;min-width:80px;min-height:45px}.gridForm .input-group>.addon{background:0 0;border:none;color:#36c}.grid-table tbody>tr>td{vertical-align:middle}.modal-dialog>.modal-content{max-height:100vh}.modal-content>.modal-body{max-height:85vh;overflow-y:auto;padding-bottom:40px}.modal-content fv-navigator{display:block;height:50px;position:fixed;bottom:0;left:0;right:0;padding:0 3rem;background-color:#fdfdfd9e;border-bottom-right-radius:10px;border-bottom-left-radius:10px;margin:0 2px;z-index:999}.modal-content fv-navigator .docked-buttons{width:auto}.modal-content fv-navigator .btn-col:not(.bottom){max-width:unset;padding:6px!important}span.required{color:red}form:not(.ng-untouched) .ng-invalid{border:1px solid red},form:not(.ng-untouched) .ng-invalid.input-group-addon{border-left:none!important}span.error-block{color:red}@media screen and (max-width:426px){.columns-2,.columns-3,.columns-4{width:100%;max-width:100%;min-width:100%}}.tree:last-of-type(.accordion){margin:0}select:disabled{background:#eee}navigator-bot,navigator-top{display:flex}fv-menu-folder:last-of-type>accordion:last-of-type{margin:0;padding:0}.button-group>button:not(:last-child):not(:first-child){margin-left:0!important;padding-left:0!important;margin-right:0!important;padding-right:0!important}.fv_container,.fv_container>*,navigator-after,navigator-before{all:inherit!important;padding:0!important}.lookup-form .gridInputs{width:100%}.lookup-form .gridInputs select{width:40%}.lookup-form .gridInputs input{width:60%}.lookup-form .gridInputs,.lookup-form .gridInputs input,.lookup-form .gridInputs select{max-width:100%}.noMarginY{margin-top:0!important;margin-bottom:0!important}.placeholder,ng-select input:-moz-placeholder,ng-select input:-ms-input-placeholder,ng-select input:-webkit-input-placeholder,ng-select input:placeholder{color:#a9a9a9}select-dropdown>div{position:relative!important;top:0!important}select-dropdown div.options{text-align:left}.modal-dialog .modal-header .pull-right span{font-size:inherit!important}bs-datepicker-navigation-view{display:block;width:100%;text-align:center}.bs-datepicker-head .previous{float:left}.bs-datepicker-head .next{float:right}textarea{min-height:45px;min-width:100%}", ".cmn-toggle{position:absolute;margin-left:-9999px;visibility:hidden}.cmn-toggle+label{display:block;position:relative;cursor:pointer;outline:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}input.cmn-toggle-round-flat+label{padding:2px;width:75px;height:30px;background-color:#ddd;border-radius:60px;transition:background .4s}input.cmn-toggle-round-flat+label:after,input.cmn-toggle-round-flat+label:before{display:block;position:absolute;content:\"\"}input.cmn-toggle-round-flat+label:before{top:2px;left:2px;bottom:2px;right:2px;background-color:#fff;border-radius:60px;transition:background .4s}input.cmn-toggle-round-flat+label:after{top:4px;left:4px;bottom:4px;width:22px;background-color:#ddd;border-radius:52px;transition:margin .4s,background .4s}input.cmn-toggle-round-flat:checked+label{background-color:#27a1ca}input.cmn-toggle-round-flat:checked+label:after{margin-left:45px;background-color:#27a1ca}"]
                }] }
    ];
    /** @nocollapse */
    FVControlsToggleComponent.ctorParameters = function () { return [
        { type: ProcessService }
    ]; };
    return FVControlsToggleComponent;
}(FVAbstractControl));
export { FVControlsToggleComponent };
if (false) {
    /** @type {?} */
    FVControlsToggleComponent.prototype.process;
}

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0Bkb3Rnb3YvZm9ybXZpZXdlci8iLCJzb3VyY2VzIjpbImxpYi9jb21wb25lbnRzL3JlbmRlcmVyL2NvbnRyb2xzL3RvZ2dsZS90b2dnbGUuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBd0IsTUFBTSxlQUFlLENBQUM7QUFDaEUsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzFELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLDRDQUE0QyxDQUFDO0FBQy9FLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxzQ0FBc0MsQ0FBQzs7SUFRdkIscURBQWlCO0lBQzlELG1DQUFvQixPQUF1QjtRQUEzQyxZQUNFLGtCQUFNLE9BQU8sQ0FBQyxTQUNmO1FBRm1CLGFBQU8sR0FBUCxPQUFPLENBQWdCOztLQUUxQzs7OztJQUVELG1EQUFlOzs7SUFBZjtRQUNFLGlCQUFNLGFBQWEsV0FBRSxDQUFDO0tBQ3ZCOztnQkFiRixTQUFTLFNBQUM7b0JBQ1QsUUFBUSxFQUFFLG9CQUFvQjtvQkFDOUIscXpDQUFzQztvQkFFdEMsYUFBYSxFQUFFLENBQUMsRUFBRSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsV0FBVyxFQUFFLE1BQU0sRUFBRSxDQUFDOztpQkFDcEU7Ozs7Z0JBUFEsY0FBYzs7b0NBSHZCO0VBVytDLGlCQUFpQjtTQUFuRCx5QkFBeUIiLCJzb3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