"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getSize = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const join_1 = tslib_1.__importDefault(require("../utils/join"));
const HUNDRED_PERCENT_SIZE = 24;
const DEFAULT_SIZE = 20;
const getSize = (size) => Math.round(size * (DEFAULT_SIZE / HUNDRED_PERCENT_SIZE));
exports.getSize = getSize;
exports.default = ({ children, size = DEFAULT_SIZE, name, tabIndex, color, ...props }) => {
    size =
        typeof size === 'number' || parseInt(size) == size
            ? (0, exports.getSize)(size)
            : size;
    return (React.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", tabIndex: tabIndex, "data-id": name, "data-name": "AdaptableIcon", ...props, className: (0, join_1.default)(props.className, `ab-Icon ab-Icon--${name}`), style: { verticalAlign: 'middle', fill: color ?? 'currentColor', ...props.style } }, children));
};
