/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
 */
import { Component, } from '@angular/core';
import { ControlContainer, NgForm } from '@angular/forms';
import { FVAbstractControl } from '../../../shared/abstract-control.component';
import { TranspilationService } from '../../../../services/transpilation.service';
import { ProcessService } from '../../../../services/process.service';
import { DomSanitizer } from '@angular/platform-browser';
export class FVControlsHtmlContentComponent extends FVAbstractControl {
    /**
     * @param {?} process
     * @param {?} transpilation
     * @param {?} sanitizer
     */
    constructor(process, transpilation, sanitizer) {
        super(process);
        this.process = process;
        this.transpilation = transpilation;
        this.sanitizer = sanitizer;
    }
    /**
     * @return {?}
     */
    ngAfterViewInit() {
        super.AfterViewInit();
        if (!this.control || !this.control.content) {
            this.warn('Custom HTML without content!!');
            return;
        }
        this.transpilation.transpileHtml(this.control.content).then((html) => {
            this._html = this.sanitizer.bypassSecurityTrustHtml(html);
        });
    }
    /**
     * @return {?}
     */
    get html() {
        return this._html;
    }
}
FVControlsHtmlContentComponent.decorators = [
    { type: Component, args: [{
                selector: 'fv-controls-html-content',
                template: "<div *ngIf=\"control\" class=\"controlBox\">\n  <i *ngIf=\"buttonsDebug\" (click)=\"debugStatus =! debugStatus\" class=\"fa fa-stethoscope\"></i>\n  <div *ngIf=\"debugStatus\" [innerText]=\"debugText()\"></div>\n  <div [innerHtml]=\"html\"></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%}"]
            }] }
];
/** @nocollapse */
FVControlsHtmlContentComponent.ctorParameters = () => [
    { type: ProcessService },
    { type: TranspilationService },
    { type: DomSanitizer }
];
if (false) {
    /** @type {?} */
    FVControlsHtmlContentComponent.prototype._html;
    /** @type {?} */
    FVControlsHtmlContentComponent.prototype.process;
    /** @type {?} */
    FVControlsHtmlContentComponent.prototype.transpilation;
    /** @type {?} */
    FVControlsHtmlContentComponent.prototype.sanitizer;
}

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