"use strict";
/**
 * @desc 加载中组件
 * @author denghuan
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const antd_1 = require("antd");
const circle_board_1 = __importDefault(require("./circle-board"));
const dots_1 = require("./dots");
function Spin(props) {
    const renderIndicator = () => {
        switch (type) {
            case 'normal':
                return react_1.default.createElement(circle_board_1.default, { type: "normal" });
            case 'square':
                return react_1.default.createElement(circle_board_1.default, { type: "primary" });
            case 'dots':
                return react_1.default.createElement(dots_1.Dots, null);
        }
    };
    const { type = 'normal', indicator = renderIndicator(), ...others } = props;
    return react_1.default.createElement(antd_1.Spin, { ...others, indicator: indicator });
}
exports.default = Spin;
