/**
 * @fileoverview added by tsickle
 * Generated from: lib/form/switch-input/index.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// 组件类
import { Component, EventEmitter, Input, Output } from "@angular/core";
var SwitchInputComponent = /** @class */ (function () {
    function SwitchInputComponent() {
        this.orientation = 'front';
        this.disabled = false;
        this.error = false;
        this.valueChange = new EventEmitter();
    }
    /**
     * @return {?}
     */
    SwitchInputComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () { };
    /**
     * @param {?} event
     * @return {?}
     */
    SwitchInputComponent.prototype.onChange = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        /** @type {?} */
        var value = event.checked;
        this.valueChange.emit(value);
    };
    /**
     * @return {?}
     */
    SwitchInputComponent.prototype.onClick = /**
     * @return {?}
     */
    function () {
        /** @type {?} */
        var value = !this.value;
        this.valueChange.emit(value);
    };
    SwitchInputComponent.decorators = [
        { type: Component, args: [{
                    selector: "rs-switch-input",
                    template: "<div class=\"rs-switch\" [ngClass]=\"[orientation, error ? 'error' : '', disabled ? 'disabled' : '']\">\r\n  <label class=\"switch-label\" (click)=\"onClick()\"> {{ text }} </label>\r\n  <ejs-switch\r\n    [(ngModel)]=\"value\"\r\n    [disabled]=\"disabled\"\r\n    (change)=\"onChange($event)\"\r\n  ></ejs-switch>\r\n</div>\r\n",
                    styles: [".rs-switch{display:flex;align-items:center;gap:8px}.rs-switch.behind{flex-direction:row-reverse;justify-content:flex-end}.rs-switch .switch-label{color:var(--rs-label-color);font-family:var(--rs-font-family);font-size:var(--rs-font-size);cursor:pointer}.rs-switch.disabled .switch-label{cursor:default;pointer-events:none}"]
                }] }
    ];
    SwitchInputComponent.propDecorators = {
        value: [{ type: Input }],
        text: [{ type: Input }],
        orientation: [{ type: Input }],
        disabled: [{ type: Input }],
        error: [{ type: Input }],
        valueChange: [{ type: Output }]
    };
    return SwitchInputComponent;
}());
export { SwitchInputComponent };
if (false) {
    /** @type {?} */
    SwitchInputComponent.prototype.value;
    /** @type {?} */
    SwitchInputComponent.prototype.text;
    /** @type {?} */
    SwitchInputComponent.prototype.orientation;
    /** @type {?} */
    SwitchInputComponent.prototype.disabled;
    /** @type {?} */
    SwitchInputComponent.prototype.error;
    /** @type {?} */
    SwitchInputComponent.prototype.valueChange;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vcmFpc2UtY29tbW9uLWxpYi8iLCJzb3VyY2VzIjpbImxpYi9mb3JtL3N3aXRjaC1pbnB1dC9pbmRleC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQ0EsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFVLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUvRTtJQUFBO1FBUVcsZ0JBQVcsR0FBdUIsT0FBTyxDQUFDO1FBQzFDLGFBQVEsR0FBRyxLQUFLLENBQUM7UUFDakIsVUFBSyxHQUFHLEtBQUssQ0FBQztRQUd2QixnQkFBVyxHQUFHLElBQUksWUFBWSxFQUFFLENBQUM7SUFXbkMsQ0FBQzs7OztJQVRDLHVDQUFROzs7SUFBUixjQUFZLENBQUM7Ozs7O0lBQ2IsdUNBQVE7Ozs7SUFBUixVQUFTLEtBQUs7O1lBQ04sS0FBSyxHQUFHLEtBQUssQ0FBQyxPQUFPO1FBQzNCLElBQUksQ0FBQyxXQUFXLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQy9CLENBQUM7Ozs7SUFDRCxzQ0FBTzs7O0lBQVA7O1lBQ1EsS0FBSyxHQUFHLENBQUMsSUFBSSxDQUFDLEtBQUs7UUFDekIsSUFBSSxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLENBQUM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