import { Component } from '@angular/core';
import { ControlContainer, NgForm } from '@angular/forms';
import { FVAbstractControl } from '../../../shared/abstract-control.component';
import { ProcessService } from '../../../../services/process.service';
/**
 * @Author [GrigoreMe](https://github.com/grigoreme)
 */
export class FVControlsRadioButtonComponent extends FVAbstractControl {
    constructor(process) {
        super(process);
    }
    ngAfterViewInit() {
        super.AfterViewInit();
    }
}
FVControlsRadioButtonComponent.decorators = [
    { type: Component, args: [{
                selector: 'fv-controls-radio-button',
                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]=\"toString()\"></div>\n  <div class=\"input-group\">\n    <div class=\"radio\">\n      <label [class]=\"control?.inline ? 'radio-inline' : 'radio'\">\n        <input [attr.id]=\"'input-' + control.referenceName\" type=\"radio\" [name]=\"control?.key\" ngModel [disabled]=\"disabled\" [readonly]=\"isReadOnly ? true : null\"\n          [required]=\"control?.isRequired ? true : null\">\n        <span [attr.id]=\"'label-' + control.referenceName\">{{ control?.label | ltranslate }}</span>\n        <span *ngIf=\"control?.isRequired\" class=\"required px-3\">*</span>\n        <fv-controls-validator *ngIf=\"group?.controls[control.key]\" [FVFormControl]=\"group?.controls[control.key]\" [group]=\"group\"\n          [control]=\"control\" [task]=\"task\" [tabIndex]=\"tabIndex\"></fv-controls-validator>\n      </label>\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{display:block;padding:0 5px;width:100%}.col fv-form-tab .controls-row{margin:0;padding:0;width:100%}.col fv-form-tab div{max-width:100%}.columns-0,.columns-1{max-width:100%;min-width:100%;width:100%}.columns-2{max-width:50%;min-width:50%;width:50%}.columns-3{max-width:33.33%;min-width:33.33%;width:33.33%}.columns-4{max-width:25%;min-width:25%;width:25%}.controlBox .input-group{display:inline-flex;margin-top:5px;width:100%}.controlBox>.input-group>button:not(.input-group-addon),.controlBox>.input-group>input,.controlBox>.input-group>select{height:40px!important;padding:10px;width:100%}.controlBox .input-group button.input-group-addon{height:40px;position:relative;width:35px}.controlBox .input-group span.controlName{color:red}.controlBox .input-group button.input-group-addon i{bottom:0;left:0;position:absolute;right:0;top:10px}.has-text-centered,.table,.table thead th{text-align:center}.gridForm{margin:0 0 10px;padding:0;width:100%}.gridForm .input-group>.form-control{border-radius:unset;margin-right:10px;max-width:50%;min-height:45px;min-width:80px}.gridForm .input-group>.addon{background:none;border:none;color:#36c}.grid-table tbody>tr>td{vertical-align:middle}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{max-width:100%;min-width:100%;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;margin-right:0!important;padding-left: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-bottom:0!important;margin-top: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}bs-datepicker-navigation-view{display:block;text-align:center;width:100%}.bs-datepicker-head .previous{float:left}.bs-datepicker-head .next{float:right}textarea{min-height:45px;min-width:100%}.modal-dialog>.modal-content{max-height:100vh}.modal-content>.modal-body{max-height:85vh;overflow-y:auto;padding-bottom:0}.modal-content fv-navigator.nav-bottom{background-color:hsla(0,0%,99.2%,.62);border-bottom-left-radius:10px;border-bottom-right-radius:10px;bottom:0;display:block;height:50px;left:0;margin:0 2px;padding:0 3rem;position:-webkit-sticky;position:sticky;right:0;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}.modal-dialog .modal-header .pull-right span{font-size:inherit!important}.basic-commands button{margin-right:5px;text-transform:capitalize}", "input[type=checkbox],input[type=checkbox]:after{background:#e0e0e0;border:none;border-radius:5px;content:\"\";display:inline-block;font-size:small;height:20px;line-height:1.5em;outline:none;text-align:center;width:20px}input[type=checkbox]:after{height:22px;margin:-1px;width:22px}input[type=checkbox]:checked:after{background-color:#00f;color:#fff;content:\"\u2714\"}label span{line-height:30px;margin-left:5px}"]
            },] }
];
FVControlsRadioButtonComponent.ctorParameters = () => [
    { type: ProcessService }
];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8tYnV0dG9uLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29tcG9uZW50cy9yZW5kZXJlci9jb250cm9scy9SYWRpb0J1dHRvbi9yYWRpby1idXR0b24uY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQWlCLE1BQU0sZUFBZSxDQUFDO0FBQ3pELE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUMxRCxPQUFPLEVBQUUsaUJB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