"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 = (_a) => {
    var { children, size = DEFAULT_SIZE, name, tabIndex, color } = _a, props = tslib_1.__rest(_a, ["children", "size", "name", "tabIndex", "color"]);
    size = (0, exports.getSize)(size);
    return (React.createElement("svg", Object.assign({ 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: Object.assign({ verticalAlign: 'middle', fill: color !== null && color !== void 0 ? color : 'currentColor' }, props.style) }), children));
};
