"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getVerticalAlign = exports.getPadding = void 0;
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const getPadding = (size) => {
    switch (size) {
        case 'sm':
            return '0.3em';
        case 'md':
            return '1.5em';
        case 'lg':
            return '2em';
        case 'xl':
            return '3em';
        default:
            return '1em';
    }
};
exports.getPadding = getPadding;
const getVerticalAlign = (size) => {
    switch (size) {
        case 'sm':
            return '-0.3em';
        case 'md':
            return '-1.5em';
        case 'lg':
            return '-2em';
        case 'xl':
            return '-3em';
        default:
            return '-1em';
    }
};
exports.getVerticalAlign = getVerticalAlign;
const BorderedIcon = ({ children, iconSize = 'sm' }) => {
    const style = {
        padding: `${(0, exports.getPadding)(iconSize)}`,
        borderRadius: '50%',
        border: '2px solid',
        borderColor: '#D2D2D2',
        boxSizing: 'content-box',
        verticalAlign: `${(0, exports.getVerticalAlign)(iconSize)}`,
    };
    return react_1.default.cloneElement(children, { style });
};
exports.default = BorderedIcon;
//# sourceMappingURL=BorderedIcon.js.map