"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var react_skeleton_loader_1 = __importDefault(require("react-skeleton-loader"));
var themed_components_1 = __importDefault(require("@monstrosity/utilities/themed-components"));
var feather_1 = require("./feather");
var duotone_1 = require("./duotone");
var font_awesome_1 = require("./font-awesome");
var bootstrap_1 = require("./bootstrap");
var remix_1 = require("./remix");
exports.IconRoot = themed_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\tdisplay: flex;\n"], ["\n\tdisplay: flex;\n"])));
exports.Loader = function (_a) {
    var size = _a.size;
    return (react_1.default.createElement(react_skeleton_loader_1.default, { 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_1.default.createElement(feather_1.FeatherIcon, { icon: icon, size: size }));
};
var duotoneIcon = function (_a) {
    var duotone = _a.duotone, size = _a.size;
    return (react_1.default.createElement(duotone_1.DuotoneIcon, { duotone: duotone, size: size }));
};
var fasIcon = function (_a) {
    var fas = _a.fas, size = _a.size;
    return (react_1.default.createElement(font_awesome_1.FontAwesome, { fas: fas, size: size }));
};
var bootstrapIcon = function (_a) {
    var bootstrapIcon = _a.bootstrapIcon, size = _a.size;
    return (react_1.default.createElement(bootstrap_1.BootstrapIcon, { bootstrapIcon: bootstrapIcon, size: size }));
};
var remixIcon = function (_a) {
    var remix = _a.remix, size = _a.size;
    return (react_1.default.createElement(remix_1.RemixIcon, { remix: remix, size: size }));
};
exports.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;
