var __extends = (this && this.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
import { Component, Inject, forwardRef, EventEmitter, ViewEncapsulation } from '@angular/core';
import { PropertyMetadataClass } from './property.metadata.class';
import { ComponentSettingsDialogComponent } from '../component-settings-dialog.component';
export var DEFAULT_INPUTS_BOOLEAN_METADATA = PropertyMetadataClass.DEFAULT_INPUTS_METADATA.slice();
var BooleanMetadataComponent = (function (_super) {
    __extends(BooleanMetadataComponent, _super);
    function BooleanMetadataComponent(settingsDialog) {
        var _this = _super.call(this, settingsDialog) || this;
        _this.onChange = new EventEmitter();
        return _this;
    }
    BooleanMetadataComponent.prototype.parseValue = function (arg) {
        if (arg !== undefined && arg !== null && typeof arg !== 'boolean') {
            return (arg === 'true');
        }
        return arg;
    };
    BooleanMetadataComponent.prototype.ngOnInit = function () {
        this.initialize();
    };
    BooleanMetadataComponent.prototype.ngOnDestroy = function () {
        this.destroy();
    };
    BooleanMetadataComponent.DEFAULT_INPUTS_BOOLEAN_METADATA = DEFAULT_INPUTS_BOOLEAN_METADATA;
    BooleanMetadataComponent.decorators = [
        { type: Component, args: [{
                    selector: 'boolean-metadata',
                    template: "\n    <div fxLayout=\"row\" fxLayoutAlign=\"center center\" [formGroup]=\"getFormGroup()\" fxFill>\n      <mat-slide-toggle [ngModel]=\"getValue()\" (ngModelChange)=\"innerOnChange($event)\" [formControlName]=\"getPropertyName()\" fxFlex>\n        {{ data.label }}\n      </mat-slide-toggle>\n      <mat-icon fxFlex=\"10\" *ngIf=\"data.tooltip\" [matTooltip]=\"data.tooltip\" matTooltipPosition=\"right\" class=\"material-icons\">info</mat-icon>\n    </div>\n  ",
                    styles: ["\n    mat-form-field.ng-invalid.ng-touched .mat-input-wrapper .mat-hint,mat-form-field.ng-invalid.ng-touched .mat-input-wrapper .mat-input-placeholder.mat-focused{color:#f44336}mat-form-field.ng-invalid.ng-touched .mat-input-wrapper .mat-input-underline{border-top-color:#f44336}mat-form-field.ng-invalid.ng-touched .mat-input-wrapper .mat-input-underline .mat-input-ripple{background-color:#f44336}\n  "],
                    inputs: DEFAULT_INPUTS_BOOLEAN_METADATA.slice(),
                    encapsulation: ViewEncapsulation.None
                },] },
    ];
    BooleanMetadataComponent.ctorParameters = function () { return [
        { type: ComponentSettingsDialogComponent, decorators: [{ type: Inject, args: [forwardRef(function () { return ComponentSettingsDialogComponent; }),] }] }
    ]; };
    return BooleanMetadataComponent;
}(PropertyMetadataClass));
export { BooleanMetadataComponent };
//# sourceMappingURL=boolean-metadata.component.js.map