'use strict';

var jsxRuntime = require('../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
var index = require('../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
var flex = require('../flex/flex.cjs');
var text = require('../text/text.cjs');
var sidebar_module = require('./sidebar.module.css.cjs');

/**
 * @deprecated Use Sidebar component from @raystack/apsara/v1 instead.
 */
const SidebarRoot = ({ children, ...props }) => {
    return (jsxRuntime.jsxRuntimeExports.jsx(flex.Flex, { direction: "column", justify: "between", className: sidebar_module.default.sidebar, ...props, children: children }));
};
/**
 * @deprecated Use Sidebar.Header component from @raystack/apsara/v1 instead.
 */
const SidebarLogo = ({ name = "Apsara", logo, onClick, ...props }) => {
    return (jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { align: "center", direction: "row", gap: "small", onClick: onClick, ...props, children: [jsxRuntime.jsxRuntimeExports.jsx(flex.Flex, { gap: "small", children: logo }), jsxRuntime.jsxRuntimeExports.jsx(text.Text, { size: 2, className: sidebar_module.default.logo, children: name })] }));
};
/**
 * @deprecated Use Sidebar.Main component from @raystack/apsara/v1 instead.
 */
const SidebarNavigations = ({ children, ...props }) => {
    return (jsxRuntime.jsxRuntimeExports.jsx(flex.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 (jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { direction: "column", className: sidebar_module.default.navigationgroup, ...props, children: [jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { className: sidebar_module.default.navigationgroupheading, children: [icon && icon, jsxRuntime.jsxRuntimeExports.jsx(text.Text, { size: 2, style: { color: "var(--foreground-muted)" }, children: name })] }), jsxRuntime.jsxRuntimeExports.jsx(flex.Flex, { direction: "column", className: sidebar_module.default.navigationgroupcontent, children: children })] }));
};
const cell = index.cva(sidebar_module.default.cell, {
    variants: {
        active: {
            true: sidebar_module.default.active,
        },
        disabled: {
            true: sidebar_module.default.disabled,
        },
    },
});
/**
 * @deprecated Use Sidebar component from @raystack/apsara/v1 instead.
 */
const SidebarNavigationCell = ({ leadingIcon, trailingIcon, active, disabled, children, asChild = false, ...props }) => {
    return (jsxRuntime.jsxRuntimeExports.jsx(flex.Flex, { className: cell({ active, disabled }), ...props, children: asChild ? (children) : (jsxRuntime.jsxRuntimeExports.jsxs(jsxRuntime.jsxRuntimeExports.Fragment, { children: [jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { gap: "small", children: [leadingIcon, jsxRuntime.jsxRuntimeExports.jsx(text.Text, { className: sidebar_module.default.cellText, children: children })] }), trailingIcon] })) }));
};
/**
 * @deprecated Use Sidebar component from @raystack/apsara/v1 instead.
 */
const SidebarFooter = ({ children, action }) => {
    return (jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { className: sidebar_module.default.footer, gap: "small", justify: "between", children: [jsxRuntime.jsxRuntimeExports.jsx(text.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,
});

exports.Sidebar = Sidebar;
//# sourceMappingURL=sidebar.cjs.map
