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, IconButton } from '@material-ui/core';
import { FluentIcon } from '../../../utilities/iconLibrary/FluentIcon';
const useStyles = makeStyles((theme) => ({
    root: {
        borderRadius: (props) => (props.rounded ? 50 : 2),
        width: (props) => (props.rounded ? theme.spacing(4) : theme.spacing(1)),
        height: (props) => (props.rounded ? theme.spacing(4) : theme.spacing(1)),
        border: (props) => props.rounded && `1px solid ${theme.palette.divider}`,
        background: (props) => props.rounded && theme.palette.common.white
    }
}));
export const FluentIconButton = (props) => {
    const classes = useStyles(props);
    const { icon, size = 'medium', id, udprecordid } = props, otherProps = __rest(props, ["icon", "size", "id", "udprecordid"]);
    return (React.createElement(IconButton, Object.assign({}, otherProps, { classes: {
            root: classes.root
        }, udprecordid: udprecordid }), React.createElement(FluentIcon, { component: icon, size: size, id: id })));
};
//# sourceMappingURL=FluentIconButton.js.map