import { jsx as _jsx } from "react/jsx-runtime";
import cn from "classnames";
import React from "react";
import Actions from "./actions";
import Deposit from "./deposit";
import GetStarted from "./get-started";
import Header from "./header";
import History from "./history";
import { useSidebar } from "./hooks";
import Settings from "./settings";
import Transfer from "./transfer";
import Wallet from "./wallet";
import Withdraw from "./withdraw";
import { Wrapper as DefaultWrapper, DexWrapper } from "./styled";
const Sidebar = ({ children, force, isDex, className, }) => {
    const [expanded, setExpanded] = React.useState(false);
    const collapsed = React.useMemo(() => (force ? force === "collapsed" : !expanded), [expanded, force]);
    const toggle = React.useCallback((toggled) => () => setExpanded(toggled), []);
    const Wrapper = isDex ? DexWrapper : DefaultWrapper;
    return (_jsx(Wrapper, { className: cn(className, { collapsed }), onMouseEnter: toggle(true), onMouseLeave: toggle(false), children: children }));
};
export default Object.assign(Sidebar, {
    Actions,
    Deposit,
    GetStarted,
    Header,
    History,
    Settings,
    Transfer,
    Wallet,
    Withdraw,
    useSidebar,
});
//# sourceMappingURL=index.js.map