var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
import React from 'react';
import { makeStyles } from '@material-ui/core';
import clsx from 'clsx';
const useStyles = makeStyles((props) => ({
    root: {
        display: 'inline-block',
        '& > svg': {
            display: 'inherit'
        }
    },
    default: {
        fontSize: 18,
        width: 18,
        height: 18
    },
    large: {
        fontSize: 24,
        width: 24,
        height: 24
    },
    medium: {
        fontSize: 16,
        width: 16,
        height: 16
    },
    small: {
        fontSize: 14,
        width: 14,
        height: 14
    },
    xs: {
        fontSize: 12,
        width: 12,
        height: 12
    },
    color: {
        color: (props) => props.color
    },
    customSize: {
        fontSize: (props) => props.size,
        width: (props) => props.size,
        height: (props) => props.size
    }
}), { name: 'FluentIcon' });
/**
 * Wrapper for @fluentui/react-icons to provide it with required size
 */
export const FluentIcon = (props) => {
    const classes = useStyles(props);
    const { component: IconComponent, size = 'default', className, color, customSize = false } = props, otherProps = __rest(props, ["component", "size", "className", "color", "customSize"]);
    return (React.createElement(IconComponent, Object.assign({}, otherProps, { className: clsx(classes.root, className, (customSize && typeof size === 'number' && classes['customSize']) ||
            classes[size], color && classes['color']) })));
};
//# sourceMappingURL=FluentIcon.js.map