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 { Drawer, makeStyles } from '@material-ui/core';
import clsx from 'clsx';
import React from 'react';
const useStyles = makeStyles((theme) => {
    var _a, _b, _c, _d, _e, _f;
    return ({
        root: {
            width: (_a = theme === null || theme === void 0 ? void 0 : theme.dimensions) === null || _a === void 0 ? void 0 : _a.drawerWidth,
            flexShrink: 0,
            whiteSpace: 'nowrap'
        },
        expanded: {
            '&, & > $paper': {
                // width: theme.dimensions.drawerWidth,
                width: theme.spacing(32),
                transition: theme.transitions.create('width', {
                    easing: theme.transitions.easing.sharp,
                    duration: theme.transitions.duration.enteringScreen
                })
            }
        },
        collapsed: {
            '&, & > $paper': {
                overflowX: 'hidden',
                width: theme.spacing(7) + 1,
                transition: (_b = theme === null || theme === void 0 ? void 0 : theme.transitions) === null || _b === void 0 ? void 0 : _b.create('width', {
                    easing: (_d = (_c = theme === null || theme === void 0 ? void 0 : theme.transitions) === null || _c === void 0 ? void 0 : _c.easing) === null || _d === void 0 ? void 0 : _d.sharp,
                    duration: (_f = (_e = theme === null || theme === void 0 ? void 0 : theme.transitions) === null || _e === void 0 ? void 0 : _e.duration) === null || _f === void 0 ? void 0 : _f.leavingScreen
                })
            }
        },
        paper: {}
    });
}, { name: 'MiniCollapsibleSidebar' });
const MiniCollapsibleSidebar = (props) => {
    const classes = useStyles(props);
    const { expanded = true, className, children } = props, other = __rest(props, ["expanded", "className", "children"]);
    return (React.createElement(Drawer, Object.assign({ variant: "permanent", open: true }, other, { className: clsx(className, classes.root, expanded ? classes.expanded : classes.collapsed), classes: {
            root: classes.root,
            paper: classes.paper
        } }), children));
};
export default MiniCollapsibleSidebar;
//# sourceMappingURL=MiniCollapsibleSidebar.js.map