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 { Button, Dialog, DialogActions, DialogContent, DialogContentText, DialogTitle, LinearProgress, makeStyles } from '@material-ui/core';
import React from 'react';
import { PrimaryActionButton } from '../inputs/buttons/PrimaryActionButton';
const useStyles = makeStyles((theme) => ({
    root: {},
    paper: {
        borderRadius: 2,
        borderTop: (props) => props.header && `4px solid ${theme.palette.secondary.main}`
    },
    title: {
        color: (props) => props.header && theme.palette.secondary.main
    },
    actions: {
        marginBottom: 0,
        marginRight: 0,
        padding: 0
    },
    button: {
        borderRadius: 0,
        padding: 'calc(.875rem - 3px) 23px calc(.875rem - 3px) 15px',
        textTransform: 'none'
    },
    dialogContent: {
        height: (props) => props.dialogContentHeight || 'auto',
        width: (props) => props.dialogContentWidth || 'auto'
    },
    dialogLeftBorder: {
        position: 'absolute',
        left: 0,
        top: 0,
        bottom: 0,
        width: theme.spacing(1),
        backgroundColor: (props) => {
            var _a;
            return (_a = props.dialogLeftBorderColor) !== null && _a !== void 0 ? _a : theme.palette.primary.main;
        }
    }
}));
export const FluentDialog = (props) => {
    const classes = useStyles(props);
    const { title, message, actionOne, actionTwo, actionThree, labelOne, labelTwo, labelThree, open, handleClose, ariaLabelledby, ariaDescribedby, titleId, descriptionId, children, buttonOneHidden = false, buttonTwoHidden = false, buttonThreeHidden = true, disableOne, disableTwo, disableThree, progress, enableLeftBorderStyling = false } = props, otherProps = __rest(props, ["title", "message", "actionOne", "actionTwo", "actionThree", "labelOne", "labelTwo", "labelThree", "open", "handleClose", "ariaLabelledby", "ariaDescribedby", "titleId", "descriptionId", "children", "buttonOneHidden", "buttonTwoHidden", "buttonThreeHidden", "disableOne", "disableTwo", "disableThree", "progress", "enableLeftBorderStyling"]);
    return (React.createElement(Dialog, Object.assign({ open: open, onClose: handleClose, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby }, otherProps, { classes: {
            paper: classes.paper
        } }), React.createElement("div", { className: enableLeftBorderStyling ? classes.dialogLeftBorder : '' }), React.createElement(DialogTitle, { className: classes.title, id: titleId }, title), React.createElement(DialogContent, { className: classes.dialogContent }, React.createElement(DialogContentText, { id: descriptionId }, message), children), React.createElement(DialogActions, { className: classes.actions, disableSpacing: true }, !buttonThreeHidden && (React.createElement(Button, { id: "udpRecord-FluentDialog-Confirm", udprecordid: "udpRecord-FluentDialog-Confirm", onClick: actionThree, color: "secondary", disabled: disableThree, className: classes.button }, labelThree)), !buttonTwoHidden && (React.createElement(Button, { id: "udpRecord-FluentDialog-Confirm", udprecordid: "udpRecord-FluentDialog-Confirm", onClick: actionTwo, color: "secondary", disabled: disableTwo, className: classes.button }, labelTwo)), !buttonOneHidden && (React.createElement(PrimaryActionButton, { id: "udpRecord-FluentDialog-Cancel", udprecordid: "udpRecord-FluentDialog-Cancel", disabled: disableOne, onClick: actionOne }, labelOne))), progress && (React.createElement(LinearProgress, Object.assign({ color: "secondary", value: progress }, otherProps)))));
};
//# sourceMappingURL=FluentDialog.js.map