import React from "react";
import styled from "styled-components";
const sizeMap = {
    xxs: 1,
    xs: 1,
    s: 1.5,
    m: 2.25,
    l: 2.75,
    xl: 3.5,
    xxl: 6.25
};
const StyledRoot = styled.div.withConfig({
    displayName: "IconRoot__StyledRoot",
    componentId: "sc-8cad916d-0"
})([
    `display:inline-flex;width:`,
    `;height:`,
    `;flex:0 0 `,
    `;`
], ({ w })=>w, ({ w })=>w, ({ w })=>w);
export const IconRoot = ({ icon: IconComponent, size, color, className, sizeCustomProperty, sizeCustomValue, ...rest })=>{
    const c = color || 'var(--text-primary)';
    const w = sizeCustomProperty ? `var(${sizeCustomProperty}, ${sizeMap[size]}rem)` : sizeCustomValue || `${sizeMap[size]}rem`;
    return /*#__PURE__*/ React.createElement(StyledRoot, {
        "aria-hidden": true,
        w: w,
        className: className,
        ...rest
    }, /*#__PURE__*/ React.createElement(IconComponent, {
        color: c,
        size: size
    }));
};
