import { j as jsxRuntimeExports } from '../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
import { cva } from '../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
import { Flex } from '../flex/flex.js';
import { Text } from '../text/text.js';
import styles from './sidebar.module.css.js';

/**
 * @deprecated Use Sidebar component from @raystack/apsara/v1 instead.
 */
const SidebarRoot = ({ children, ...props }) => {
    return (jsxRuntimeExports.jsx(Flex, { direction: "column", justify: "between", className: styles.sidebar, ...props, children: children }));
};
/**
 * @deprecated Use Sidebar.Header component from @raystack/apsara/v1 instead.
 */
const SidebarLogo = ({ name = "Apsara", logo, onClick, ...props }) => {
    return (jsxRuntimeExports.jsxs(Flex, { align: "center", direction: "row", gap: "small", onClick: onClick, ...props, children: [jsxRuntimeExports.jsx(Flex, { gap: "small", children: logo }), jsxRuntimeExports.jsx(Text, { size: 2, className: styles.logo, children: name })] }));
};
/**
 * @deprecated Use Sidebar.Main component from @raystack/apsara/v1 instead.
 */
const SidebarNavigations = ({ children, ...props }) => {
    return (jsxRuntimeExports.jsx(Flex, { direction: "column", gap: "extra-small", ...props, children: children }));
};
/**
 * @deprecated Use Sidebar.Item component from @raystack/apsara/v1 instead.
 */
const SidebarNavigationsGroup = ({ icon, name, children, ...props }) => {
    return (jsxRuntimeExports.jsxs(Flex, { direction: "column", className: styles.navigationgroup, ...props, children: [jsxRuntimeExports.jsxs(Flex, { className: styles.navigationgroupheading, children: [icon && icon, jsxRuntimeExports.jsx(Text, { size: 2, style: { color: "var(--foreground-muted)" }, children: name })] }), jsxRuntimeExports.jsx(Flex, { direction: "column", className: styles.navigationgroupcontent, children: children })] }));
};
const cell = cva(styles.cell, {
    variants: {
        active: {
            true: styles.active,
        },
        disabled: {
            true: styles.disabled,
        },
    },
});
/**
 * @deprecated Use Sidebar component from @raystack/apsara/v1 instead.
 */
const SidebarNavigationCell = ({ leadingIcon, trailingIcon, active, disabled, children, asChild = false, ...props }) => {
    return (jsxRuntimeExports.jsx(Flex, { className: cell({ active, disabled }), ...props, children: asChild ? (children) : (jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs(Flex, { gap: "small", children: [leadingIcon, jsxRuntimeExports.jsx(Text, { className: styles.cellText, children: children })] }), trailingIcon] })) }));
};
/**
 * @deprecated Use Sidebar component from @raystack/apsara/v1 instead.
 */
const SidebarFooter = ({ children, action }) => {
    return (jsxRuntimeExports.jsxs(Flex, { className: styles.footer, gap: "small", justify: "between", children: [jsxRuntimeExports.jsx(Text, { children: children }), action] }));
};
/**
 * @deprecated Use Sidebar from '@raystack/apsara/v1' instead.
 */
const Sidebar = Object.assign(SidebarRoot, {
    Logo: SidebarLogo,
    Navigations: SidebarNavigations,
    NavigationGroup: SidebarNavigationsGroup,
    NavigationCell: SidebarNavigationCell,
    Footer: SidebarFooter,
});

export { Sidebar };
//# sourceMappingURL=sidebar.js.map
