"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 };
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = __importDefault(require("react"));
var themed_components_1 = __importDefault(require("@monstrosity/utilities/themed-components"));
var icon_1 = require("./icon");
var loadable_1 = require("../../primitives/Loadable/loadable");
var BootstrapWrapper = themed_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n\twidth: ", " !important;\n\theight: ", " !important;\n\n\t& svg {\n\t\twidth: ", " !important;\n\t\theight: ", " !important;\n\t}\n"], ["\n\twidth: ", " !important;\n\theight: ", " !important;\n\n\t& svg {\n\t\twidth: ", " !important;\n\t\theight: ", " !important;\n\t}\n"])), function (_a) {
    var size = _a.size;
    return size || '2rem';
}, function (_a) {
    var size = _a.size;
    return size || '2rem';
}, function (_a) {
    var size = _a.size;
    return size || '2rem';
}, function (_a) {
    var size = _a.size;
    return size || '2rem';
});
exports.BootstrapIcon = function (_a) {
    var bootstrapIcon = _a.bootstrapIcon, size = _a.size;
    var importStatement = function () { return Promise.resolve().then(function () { return __importStar(require("react-bootstrap-icons/dist/icons/" + bootstrapIcon)); }); };
    var fallbackStatement = function () { return require("react-bootstrap-icons/dist/icons/" + bootstrapIcon).default; };
    return (react_1.default.createElement(icon_1.IconRoot, null,
        react_1.default.createElement(BootstrapWrapper, { size: size },
            react_1.default.createElement(loadable_1.Loadable, { loadingView: react_1.default.createElement(icon_1.Loader, { size: size }), importStatement: importStatement, fallbackStatement: fallbackStatement, size: size }))));
};
var templateObject_1;
