/**
 * @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";
export class SwitchInputComponent {
    constructor() {
        this.orientation = 'front';
        this.disabled = false;
        this.error = false;
        this.valueChange = new EventEmitter();
    }
    /**
     * @return {?}
     */
    ngOnInit() { }
    /**
     * @param {?} event
     * @return {?}
     */
    onChange(event) {
        /** @type {?} */
        const value = event.checked;
        this.valueChange.emit(value);
    }
    /**
     * @return {?}
     */
    onClick() {
        /** @type {?} */
        const 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 }]
};
if (false) {
    /** @type {?} */
    SwitchInputComponent.prototype.value;
    /** @type {?} */
    SwitchInputComponent.prototype.text;
    /** @type {?} */
    SwitchInputComponent.prototype.orientation;
    /** @type {?} */
    SwitchInputComponent.prototype.disabled;
    /** @type {?} */
    SwitchInputComponent.prototype.error;
    /** @type {?} */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