import React from 'react';
import { BallIndicator, BarIndicator, DotIndicator, MaterialIndicator, PacmanIndicator, PulseIndicator, SkypeIndicator, UIActivityIndicator, WaveIndicator, } from 'react-native-indicators';
import { Colors } from '../../styles';
/**
 * Type of spinner. See examples at:
 *
 * https://github.com/n4kz/react-native-indicators
 *
 * @export
 * @enum {string}
 */
export var CrossSpinnerType;
(function (CrossSpinnerType) {
    CrossSpinnerType["BallIndicator"] = "BallIndicator";
    CrossSpinnerType["BarIndicator"] = "BarIndicator";
    CrossSpinnerType["DotIndicator"] = "DotIndicator";
    CrossSpinnerType["MaterialIndicator"] = "MaterialIndicator";
    CrossSpinnerType["PacmanIndicator"] = "PacmanIndicator";
    CrossSpinnerType["PulseIndicator"] = "PulseIndicator";
    CrossSpinnerType["SkypeIndicator"] = "SkypeIndicator";
    CrossSpinnerType["UIActivityIndicator"] = "UIActivityIndicator";
    CrossSpinnerType["WaveIndicator"] = "WaveIndicator";
})(CrossSpinnerType || (CrossSpinnerType = {}));
/**
 * Generates a React-Native spinning busy indicator
 *
 * Properties are {@link ICrossSpinnerProps}
 *
 * https://github.com/n4kz/react-native-indicators
 *
 * @param param0 see {@link ISpinnerProps}
 */
export const CrossSpinner = ({ type, style = null, color = Colors.CrossLightBlue, count = 8, size = 40, testID = type.toString(), }) => {
    const props = {
        type,
        style,
        count,
        size,
        color,
        testID,
    };
    switch (type) {
        case 'BallIndicator':
            return React.createElement(BallIndicator, Object.assign({}, props));
        case 'BarIndicator':
            return React.createElement(BarIndicator, Object.assign({}, props));
        case 'DotIndicator':
            return React.createElement(DotIndicator, Object.assign({}, props));
        case 'PacmanIndicator':
            return React.createElement(PacmanIndicator, Object.assign({}, props));
        case 'PulseIndicator':
            return React.createElement(PulseIndicator, Object.assign({}, props));
        case 'SkypeIndicator':
            return React.createElement(SkypeIndicator, Object.assign({}, props));
        case 'UIActivityIndicator':
            return React.createElement(UIActivityIndicator, Object.assign({}, props));
        case 'WaveIndicator':
            return React.createElement(WaveIndicator, Object.assign({}, props));
        default:
            return React.createElement(MaterialIndicator, Object.assign({}, props));
    }
};
//# sourceMappingURL=CrossSpinner.js.map