"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const core_1 = require("@material-ui/core");
const useStyles = core_1.makeStyles({
    content: {
        '&::-webkit-scrollbar': {
            width: 6,
        },
        '&::-webkit-scrollbar-track': {
            background: 'transparent',
        },
        '&::-webkit-scrollbar-thumb': {
            background: 'rgb(130, 130, 130)',
            borderRadius: 3,
        },
    },
});
function WxDialog({ open, fullScreen, onClose, title, titleIcon, children, actions, width = 'sm', onExited, }) {
    const styles = useStyles();
    const theme = core_1.useTheme();
    const fs = fullScreen !== null && fullScreen !== void 0 ? fullScreen : core_1.useMediaQuery(theme.breakpoints.down(width));
    return (react_1.default.createElement(core_1.Dialog, { maxWidth: width, fullWidth: true, fullScreen: fs, open: open, onClose: onClose, onExited: onExited },
        react_1.default.createElement(core_1.DialogTitle, { disableTypography: true },
            react_1.default.createElement(core_1.Box, { display: "flex" },
                titleIcon && (react_1.default.createElement(core_1.Box, { mr: 1, color: theme.palette.primary.main }, titleIcon)),
                react_1.default.createElement(core_1.Typography, { variant: "h3", color: "textPrimary" }, title))),
        react_1.default.createElement(core_1.DialogContent, { className: styles.content }, children),
        react_1.default.createElement(core_1.DialogActions, null, actions)));
}
exports.default = WxDialog;
