import { __assign, __extends, __rest } from "tslib";
import { Icon, Switch } from '@alicloud/console-components';
import React from 'react';
var LPSwitch = /** @class */ (function (_super) {
    __extends(LPSwitch, _super);
    function LPSwitch(props, context) {
        return _super.call(this, props, context) || this;
    }
    LPSwitch.prototype.render = function () {
        var _a = this.props, loading = _a.loading, checkedChildren = _a.checkedChildren, unCheckedChildren = _a.unCheckedChildren, res = __rest(_a, ["loading", "checkedChildren", "unCheckedChildren"]);
        return loading === undefined ? (React.createElement(Switch, __assign({ checkedChildren: React.createElement("span", null, checkedChildren), unCheckedChildren: React.createElement("span", null, unCheckedChildren) }, res))) : (React.createElement(Switch, __assign({ checkedChildren: React.createElement("div", null,
                React.createElement(Icon, { type: "loading", size: 'small', style: {
                        display: loading ? 'initial' : 'none'
                    } }),
                React.createElement("span", { style: {
                        display: loading ? 'none' : 'block'
                    } }, checkedChildren)), unCheckedChildren: React.createElement("div", null,
                React.createElement("span", { style: {
                        display: loading ? 'none' : 'block'
                    } }, unCheckedChildren),
                React.createElement(Icon, { type: "loading", size: 'small', style: {
                        display: loading ? 'initial' : 'none'
                    } })) }, res)));
    };
    return LPSwitch;
}(React.Component));
export default LPSwitch;
