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 { Button, CircularProgress } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
    root: {
        borderRadius: 2,
        height: (props) => (props.height ? props.height : 32),
        padding: '0 16px',
        minWidth: (props) => (props.minWidth ? props.minWidth : 80),
        border: (props) => `1px solid ${props.color}`
    },
    label: {
        textTransform: 'capitalize',
        fontSize: '0.875rem',
        fontWeight: 600
    }
}));
export const FluentButton = (props) => {
    const classes = useStyles(props);
    const { children, id, udprecordid, minWidth, progress, disabled } = props, otherProps = __rest(props, ["children", "id", "udprecordid", "minWidth", "progress", "disabled"]);
    return (React.createElement(Button, Object.assign({}, otherProps, { disableElevation: true, classes: {
            root: classes.root,
            label: classes.label
        }, margin: "dense", id: id, udprecordid: udprecordid, minWidth: minWidth, disabled: disabled || progress }), progress && (React.createElement(CircularProgress, { id: id + '-ButtonProgress', udprecordid: udprecordid + '-ButtonProgress', size: 18, color: "primary" })), !progress && children));
};
//# sourceMappingURL=FluentButton.js.map