import React from 'react';
import { convert } from '@monstrosity/utilities/hoist-icon-enums/hoist-enum';
import { Loadable } from '../../primitives/Loadable/loadable';
import { Loader, IconRoot } from './icon';
export var FeatherIcon = function (_a) {
    var icon = _a.icon, size = _a.size;
    var importStatement = function () { return import("react-feather/dist/icons/" + icon); };
    var fallbackStatement = function () { return require('react-feather')[convert(icon)]; };
    return (React.createElement(IconRoot, null,
        React.createElement(Loadable, { loadingView: React.createElement(Loader, { size: size }), importStatement: importStatement, fallbackStatement: fallbackStatement, size: size })));
};
