/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { getBooleanValue } from '../../utils/get-boolean-value.util';
var RadioComponent = /** @class */ (function () {
    function RadioComponent() {
        this.onClickEmitter = new EventEmitter();
    }
    /**
     * @return {?}
     */
    RadioComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.initValues();
    };
    /**
     * @return {?}
     */
    RadioComponent.prototype.initValues = /**
     * @return {?}
     */
    function () {
        var defaultProps = RadioComponent.defaultProps;
        this.className = this.classNameInput || defaultProps.className;
        this.disabled = getBooleanValue(this.disabledInput, defaultProps.disabled);
        this.id = this.idInput || defaultProps.id;
        this.name = this.nameInput || defaultProps.name;
        this.required = getBooleanValue(this.requiredInput, defaultProps.required);
        this.value = this.valueInput || defaultProps.value;
        this.isActive = false;
        this.isFocused = false;
    };
    /**
     * @return {?}
     */
    RadioComponent.prototype.onClick = /**
     * @return {?}
     */
    function () {
        if (!this.disabled) {
            this.isActive = !this.isActive;
            this.isFocused = false;
            this.onClickEmitter.emit(this.value);
        }
    };
    /**
     * @return {?}
     */
    RadioComponent.prototype.onBlur = /**
     * @return {?}
     */
    function () {
        this.isFocused = false;
    };
    /**
     * @param {?} event
     * @return {?}
     */
    RadioComponent.prototype.onFocus = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        if (!this.disabled) {
            this.isFocused = true;
        }
    };
    RadioComponent.defaultProps = {
        className: '',
        disabled: false,
        id: '',
        name: '',
        required: false,
        value: ''
    };
    RadioComponent.decorators = [
        { type: Component, args: [{
                    selector: 'materialize-radio',
                    template: "<div class=\"form-radio-control\">\n  <div class=\"form-radio-indicator\"\n    (click)=\"onClick()\"\n    (blur)=\"onBlur()\"\n    (focus)=\"onFocus($event)\"\n\n    [class.active]=\"isActive\"\n    [class.disabled]=\"disabled\"\n    [class.focused]=\"isFocused\"\n    \n    [tabindex]=\"disabled ? '-1': '0'\">\n    <div class=\"form-radio-indicator-ripple\" materializeRipple [isRippleActive]=\"!disabled\" [rippleDuration]=\"200\"></div>\n  </div>\n\n  <div class=\"form-radio-label-container\">\n    <ng-content></ng-content>\n  <div>\n\n  <input type=\"radio\"\n    [attr.id]=\"id\"\n    [checked]=\"isActive\"\n    [disabled]=\"disabled\"\n    [name]=\"name\"\n    [required]=\"required\"\n    [value]= \"value\" />\n</div>\n",
                    styles: [".form-radio-label-container{color:#000;font-family:Roboto;font-size:16px;font-weight:300}.form-radio-control{align-items:center;display:flex;flex-direction:row;outline:0;padding:8px 0;position:relative}.form-radio-control input[type=radio]{display:none}.form-radio-indicator{border:2px solid #6a6a6a;border-radius:50%;cursor:pointer;height:20px;margin:0 12px;outline:0;position:relative;width:20px}.form-radio-indicator::before{border-radius:50%;content:'';height:10px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:10px}.form-radio-indicator-ripple{border-radius:50%;height:40px;left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);transition:background-color .3s;width:40px;z-index:10}.form-radio-indicator:hover:not(.disabled).active .form-radio-indicator-ripple{background-color:rgba(87,7,235,.1)}.form-radio-indicator:hover:not(.disabled) .form-radio-indicator-ripple{background-color:rgba(106,106,106,.1)}.form-radio-indicator.focused:not(.disabled).active .form-radio-indicator-ripple{background-color:rgba(87,7,235,.3)}.form-radio-indicator.focused:not(.disabled) .form-radio-indicator-ripple{background-color:rgba(106,106,106,.3)}.form-radio-indicator.active{border-color:#5707eb}.form-radio-indicator.active::before{background-color:#5707eb}.form-radio-indicator.active .form-radio-indicator-ripple ::ng-deep .ripple{background-color:rgba(87,7,235,.3)}.form-radio-indicator.disabled{border-color:#b7b7b7;cursor:not-allowed}.form-radio-indicator.disabled.active::before{background-color:#b7b7b7}"]
                }] }
    ];
    /** @nocollapse */
    RadioComponent.ctorParameters = function () { return []; };
    RadioComponent.propDecorators = {
        onClickEmitter: [{ type: Output, args: ['onClick',] }],
        classNameInput: [{ type: Input, args: ['className',] }],
        disabledInput: [{ type: Input, args: ['disabled',] }],
        idInput: [{ type: Input, args: ['id',] }],
        nameInput: [{ type: Input, args: ['name',] }],
        requiredInput: [{ type: Input, args: ['required',] }],
        valueInput: [{ type: Input, args: ['value',] }]
    };
    return RadioComponent;
}());
export { RadioComponent };
if (false) {
    /** @type {?} */
    RadioComponent.defaultProps;
    /** @type {?} */
    RadioComponent.prototype.onClickEmitter;
    /** @type {?} */
    RadioComponent.prototype.classNameInput;
    /** @type {?} */
    RadioComponent.prototype.disabledInput;
    /** @type {?} */
    RadioComponent.prototype.idInput;
    /** @type {?} */
    RadioComponent.prototype.nameInput;
    /** @type {?} */
    RadioComponent.prototype.requiredInput;
    /** @type {?} */
    RadioComponent.prototype.valueInput;
    /** @type {?} */
    RadioComponent.prototype.className;
    /** @type {?} */
    RadioComponent.prototype.disabled;
    /** @type {?} */
    RadioComponent.prototype.id;
    /** @type {?} */
    RadioComponent.prototype.isActive;
    /** @type {?} */
    RadioComponent.prototype.isFocused;
    /** @type {?} */
    RadioComponent.prototype.name;
    /** @type {?} */
    RadioComponent.prototype.required;
    /** @type {?} */
    RadioComponent.prototype.value;
}
//# sourceMappingURL=data:application/json;base64, 