var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
import React from 'react';
import Skeleton from 'react-skeleton-loader';
import styled from '@monstrosity/utilities/themed-components';
import { FeatherIcon } from './feather';
import { DuotoneIcon } from './duotone';
import { FontAwesome } from './font-awesome';
import { BootstrapIcon } from './bootstrap';
import { RemixIcon } from './remix';
export var IconRoot = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tdisplay: flex;\n"], ["\n\tdisplay: flex;\n"])));
export var Loader = function (_a) {
    var size = _a.size;
    return (React.createElement(Skeleton, { width: size || '2rem', height: size || '2rem', borderRadius: "0.25rem", animated: true }));
};
function isFeather(props) {
    if (props.icon)
        return true;
    return false;
}
function isDuotone(props) {
    if (props.duotone)
        return true;
    return false;
}
function isBootstrap(props) {
    if (props.bootstrapIcon)
        return true;
    return false;
}
function isFas(props) {
    if (props.fas)
        return true;
    return false;
}
function isRemix(props) {
    if (props.remix)
        return true;
    return false;
}
var featherIcon = function (_a) {
    var icon = _a.icon, size = _a.size;
    return (React.createElement(FeatherIcon, { icon: icon, size: size }));
};
var duotoneIcon = function (_a) {
    var duotone = _a.duotone, size = _a.size;
    return (React.createElement(DuotoneIcon, { duotone: duotone, size: size }));
};
var fasIcon = function (_a) {
    var fas = _a.fas, size = _a.size;
    return (React.createElement(FontAwesome, { fas: fas, size: size }));
};
var bootstrapIcon = function (_a) {
    var bootstrapIcon = _a.bootstrapIcon, size = _a.size;
    return (React.createElement(BootstrapIcon, { bootstrapIcon: bootstrapIcon, size: size }));
};
var remixIcon = function (_a) {
    var remix = _a.remix, size = _a.size;
    return (React.createElement(RemixIcon, { remix: remix, size: size }));
};
export var Icon = function (props) {
    if (isFeather(props))
        return featherIcon(props);
    if (isDuotone(props))
        return duotoneIcon(props);
    if (isBootstrap(props))
        return bootstrapIcon(props);
    if (isRemix(props))
        return remixIcon(props);
    if (isFas(props))
        return fasIcon(props);
    return null;
};
var templateObject_1;
