/**
 * @desc 加载中组件
 * @author denghuan
 */
import React from 'react';
import { Spin as AntSpin } from 'antd';
import CircledBoard from './circle-board';
import { Dots } from './dots';
export default function Spin(props) {
    const renderIndicator = () => {
        switch (type) {
            case 'normal':
                return React.createElement(CircledBoard, { type: "normal" });
            case 'square':
                return React.createElement(CircledBoard, { type: "primary" });
            case 'dots':
                return React.createElement(Dots, null);
        }
    };
    const { type = 'normal', indicator = renderIndicator(), ...others } = props;
    return React.createElement(AntSpin, { ...others, indicator: indicator });
}
