"use client";
import { cn } from "./index3.js";
import { Button } from "./index6.js";
import { Separator } from "./index7.js";
import { Skeleton } from "./index17.js";
import { createSafeContext } from "./index21.js";
import { Input } from "./index38.js";
import { Tooltip, TooltipPopup, TooltipTrigger } from "./index436.js";
import { SheetContent, SheetDescription, SheetHeader, SheetNamespace, SheetTitle } from "./index470.js";
import { useIsMobile } from "./index471.js";
import { cva } from "class-variance-authority";
import { PanelLeft } from "lucide-react";
import * as React from "react";
import { jsx, jsxs } from "react/jsx-runtime";
import { mergeProps } from "@base-ui/react/merge-props";
import { useRender } from "@base-ui/react/use-render";
//#region src/components/ui/sidebar.tsx
var SIDEBAR_COOKIE_NAME = "sidebar_state";
var SIDEBAR_COOKIE_MAX_AGE = 3600 * 24 * 7;
var SIDEBAR_WIDTH = "324px";
var SIDEBAR_WIDTH_MOBILE = "18rem";
var SIDEBAR_WIDTH_ICON = "108px";
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
var [SidebarContext, useSidebar] = createSafeContext("SidebarProvider");
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, connected = true, loading = false, contentBgColor, className, style, children, ...props }) {
	const isMobile = useIsMobile();
	const [openMobile, setOpenMobile] = React.useState(false);
	const [_open, _setOpen] = React.useState(defaultOpen);
	const open = openProp ?? _open;
	const openRef = React.useRef(open);
	openRef.current = open;
	const setOpen = React.useCallback((value) => {
		const openState = typeof value === "function" ? value(openRef.current) : value;
		if (setOpenProp) setOpenProp(openState);
		else _setOpen(openState);
		document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
	}, [setOpenProp]);
	const toggleSidebar = React.useCallback(() => {
		return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
	}, [isMobile, setOpen]);
	const wrapperRef = React.useRef(null);
	React.useEffect(() => {
		const handleKeyDown = (event) => {
			if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
				event.preventDefault();
				toggleSidebar();
			}
		};
		const win = wrapperRef.current?.ownerDocument.defaultView ?? window;
		if (!win) return;
		win.addEventListener("keydown", handleKeyDown);
		return () => win.removeEventListener("keydown", handleKeyDown);
	}, [toggleSidebar]);
	React.useEffect(() => {
		const root = wrapperRef.current?.ownerDocument.documentElement ?? document.documentElement;
		root.style.setProperty("--sidebar-width", SIDEBAR_WIDTH);
		root.style.setProperty("--sidebar-width-mobile", SIDEBAR_WIDTH_MOBILE);
		root.style.setProperty("--sidebar-width-icon", SIDEBAR_WIDTH_ICON);
		if (isMobile) {
			root.style.setProperty("--sidebar-mobile", "1");
			root.style.setProperty("--sidebar-width-current", SIDEBAR_WIDTH_MOBILE);
			root.dataset.sidebarMobile = "true";
		} else {
			root.style.setProperty("--sidebar-mobile", "0");
			root.style.setProperty("--sidebar-width-current", SIDEBAR_WIDTH);
			root.dataset.sidebarMobile = "false";
		}
		return () => {
			root.style.removeProperty("--sidebar-mobile");
			root.style.removeProperty("--sidebar-width");
			root.style.removeProperty("--sidebar-width-mobile");
			root.style.removeProperty("--sidebar-width-icon");
			root.style.removeProperty("--sidebar-width-current");
			delete root.dataset.sidebarMobile;
		};
	}, [isMobile]);
	const state = open ? "expanded" : "collapsed";
	const contextValue = React.useMemo(() => ({
		state,
		open,
		setOpen,
		isMobile,
		openMobile,
		setOpenMobile,
		toggleSidebar,
		connected,
		loading,
		contentBgColor
	}), [
		state,
		open,
		setOpen,
		isMobile,
		openMobile,
		toggleSidebar,
		connected,
		loading,
		contentBgColor
	]);
	return /* @__PURE__ */ jsx(SidebarContext.Provider, {
		value: contextValue,
		children: /* @__PURE__ */ jsx("div", {
			ref: wrapperRef,
			"data-slot": "sidebar-wrapper",
			style: {
				"--sidebar-width": SIDEBAR_WIDTH,
				"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
				...style
			},
			className: cn("group/sidebar-wrapper flex w-full", connected ? "h-full" : "min-h-svh", className),
			...props,
			children
		})
	});
}
SidebarProvider.displayName = "SidebarProvider";
/**
* Sidebar is a responsive navigation container.
* Supports mobile sheet mode, keyboard shortcuts, and persistent state via cookies.
*
* @llms Responsive sidebar with mobile sheet mode
* @example
* ```tsx
* <SidebarProvider>
*   <Sidebar collapsible="icon">
*     <SidebarHeader />
*     <SidebarContent>...</SidebarContent>
*     <SidebarFooter />
*   </Sidebar>
* </SidebarProvider>
* ```
*/
function Sidebar({ side = "left", collapsible = "offcanvas", width = SIDEBAR_WIDTH, collapsedWidth = SIDEBAR_WIDTH_ICON, mobileWidth = SIDEBAR_WIDTH_MOBILE, offsetTop = "0px", offsetBottom = "0px", rounded = false, className, style, children, ...props }) {
	const { isMobile, state, openMobile, setOpenMobile, connected } = useSidebar();
	const roundedClass = React.useMemo(() => {
		if (!rounded) return "";
		return side === "left" ? "rounded-r-(--sidebar-radius,0.5rem)" : "rounded-l-(--sidebar-radius,0.5rem)";
	}, [rounded, side]);
	if (connected) return /* @__PURE__ */ jsx("div", {
		"data-slot": "sidebar",
		"data-state": state,
		"data-collapsible": state === "collapsed" ? collapsible : "",
		"data-connected": "true",
		className: cn("group text-sidebar-foreground flex h-full w-full flex-col overflow-hidden", className),
		style: {
			"--sidebar-width": width,
			"--sidebar-width-icon": collapsedWidth,
			...style
		},
		...props,
		children
	});
	if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
		"data-slot": "sidebar",
		className: cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", className),
		...props,
		children
	});
	if (isMobile) return /* @__PURE__ */ jsx(SheetNamespace, {
		open: openMobile,
		onOpenChange: setOpenMobile,
		...props,
		children: /* @__PURE__ */ jsxs(SheetContent, {
			"data-sidebar": "sidebar",
			"data-slot": "sidebar",
			"data-mobile": "true",
			className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
			style: { "--sidebar-width": mobileWidth },
			side,
			children: [/* @__PURE__ */ jsxs(SheetHeader, {
				className: "sr-only",
				children: [/* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }), /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })]
			}), /* @__PURE__ */ jsx("div", {
				className: "flex h-full w-full flex-col",
				children
			})]
		})
	});
	return /* @__PURE__ */ jsxs("div", {
		className: "group peer text-sidebar-foreground hidden md:block",
		"data-state": state,
		"data-collapsible": state === "collapsed" ? collapsible : "",
		"data-side": side,
		"data-slot": "sidebar",
		children: [/* @__PURE__ */ jsx("div", {
			"data-slot": "sidebar-gap-container",
			className: cn("grid transition-[grid-template-columns] duration-200 ease-linear motion-reduce:transition-none", "grid-cols-[var(--sidebar-width)]", "group-data-[collapsible=offcanvas]:grid-cols-[0fr]", "group-data-[side=right]:rotate-180", "group-data-[collapsible=icon]:grid-cols-[var(--sidebar-width-icon)]"),
			children: /* @__PURE__ */ jsx("div", {
				"data-slot": "sidebar-gap",
				className: "overflow-hidden bg-transparent"
			})
		}), /* @__PURE__ */ jsx("div", {
			"data-slot": "sidebar-container",
			style: {
				"--sidebar-width": width,
				"--sidebar-width-icon": collapsedWidth,
				"--sidebar-offset-top": offsetTop,
				"--sidebar-offset-bottom": offsetBottom,
				...style
			},
			className: cn("fixed z-10 hidden transition-[left,right,width,height,top,bottom] duration-200 ease-linear will-change-[width,transform] motion-reduce:transition-none md:flex", "w-(--sidebar-width)", "top-[var(--sidebar-offset-top)] bottom-[var(--sidebar-offset-bottom)] h-[calc(100svh-var(--sidebar-offset-top)-var(--sidebar-offset-bottom))]", side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]", "group-data-[collapsible=icon]:w-(--sidebar-width-icon)", className),
			...props,
			children: /* @__PURE__ */ jsx("div", {
				"data-sidebar": "sidebar",
				"data-slot": "sidebar-inner",
				className: cn("flex size-full flex-col", roundedClass),
				children
			})
		})]
	});
}
Sidebar.displayName = "Sidebar";
function SidebarTrigger({ className, onClick, ...props }) {
	const { toggleSidebar, open } = useSidebar();
	return /* @__PURE__ */ jsxs(Button, {
		"data-sidebar": "trigger",
		"data-slot": "sidebar-trigger",
		appearance: "ghost",
		variant: "secondary",
		size: "icon-sm",
		"aria-expanded": open,
		className: cn(className),
		onClick: (event) => {
			onClick?.(event);
			toggleSidebar();
		},
		...props,
		children: [/* @__PURE__ */ jsx(PanelLeft, { "aria-hidden": "true" }), /* @__PURE__ */ jsx("span", {
			className: "sr-only",
			children: "Toggle Sidebar"
		})]
	});
}
SidebarTrigger.displayName = "SidebarTrigger";
function SidebarRail({ className, ...props }) {
	const { toggleSidebar } = useSidebar();
	return /* @__PURE__ */ jsx("button", {
		"data-sidebar": "rail",
		"data-slot": "sidebar-rail",
		"aria-label": "Toggle Sidebar",
		tabIndex: -1,
		onClick: toggleSidebar,
		title: "Toggle Sidebar",
		className: cn("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear motion-reduce:transition-none group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
		...props
	});
}
SidebarRail.displayName = "SidebarRail";
function SidebarInset({ className, connected: connectedProp, contentBgColor: contentBgColorProp, ...props }) {
	const context = React.useContext(SidebarContext);
	const connected = connectedProp ?? context?.connected ?? false;
	const isMobile = context?.isMobile ?? false;
	const bgColor = contentBgColorProp ?? context?.contentBgColor ?? "bg-background";
	if (connected) return /* @__PURE__ */ jsx("main", {
		"data-slot": "sidebar-inset",
		"data-connected": "true",
		"data-mobile": isMobile ? "true" : "false",
		className: cn("relative flex h-full w-full flex-1 flex-col overflow-hidden", bgColor, isMobile && "p-0", className),
		...props
	});
	return /* @__PURE__ */ jsx("main", {
		"data-slot": "sidebar-inset",
		"data-mobile": isMobile ? "true" : "false",
		className: cn(bgColor, "relative flex w-full flex-1 flex-col", className),
		...props
	});
}
SidebarInset.displayName = "SidebarInset";
function SidebarInput({ className, ...props }) {
	return /* @__PURE__ */ jsx(Input, {
		"data-slot": "sidebar-input",
		"data-sidebar": "input",
		className: cn("bg-background h-8 w-full shadow-none", className),
		...props
	});
}
SidebarInput.displayName = "SidebarInput";
function SidebarHeader({ className, ...props }) {
	return /* @__PURE__ */ jsx("div", {
		"data-slot": "sidebar-header",
		"data-sidebar": "header",
		className: cn("gap-[var(--sidebar-gap,0.5rem)] p-[var(--sidebar-padding-inner,0.5rem)] flex shrink-0 flex-col", className),
		...props
	});
}
SidebarHeader.displayName = "SidebarHeader";
function SidebarFooter({ className, ...props }) {
	return /* @__PURE__ */ jsx("div", {
		"data-slot": "sidebar-footer",
		"data-sidebar": "footer",
		className: cn("gap-[var(--sidebar-gap,0.5rem)] p-[var(--sidebar-padding-inner,0.5rem)] flex shrink-0 flex-col", className),
		...props
	});
}
SidebarFooter.displayName = "SidebarFooter";
function SidebarSeparator({ className, ...props }) {
	return /* @__PURE__ */ jsx(Separator, {
		"data-slot": "sidebar-separator",
		"data-sidebar": "separator",
		className: cn("bg-sidebar-border mx-2 w-auto", className),
		...props
	});
}
SidebarSeparator.displayName = "SidebarSeparator";
function SidebarContent({ className, ...props }) {
	return /* @__PURE__ */ jsx("div", {
		"data-slot": "sidebar-content",
		"data-sidebar": "content",
		className: cn("no-scrollbar gap-[var(--sidebar-gap,0.5rem)] flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
		...props
	});
}
SidebarContent.displayName = "SidebarContent";
function SidebarGroup({ className, ...props }) {
	return /* @__PURE__ */ jsx("div", {
		"data-slot": "sidebar-group",
		"data-sidebar": "group",
		className: cn("p-[var(--sidebar-padding-inner,0.5rem)] relative flex w-full min-w-0 flex-col", className),
		...props
	});
}
SidebarGroup.displayName = "SidebarGroup";
function SidebarGroupLabel({ className, render, ...props }) {
	return useRender({
		defaultTagName: "div",
		props: mergeProps({ className: cn("text-sidebar-foreground/80 ring-sidebar-ring h-8 rounded-md px-2 text-xs font-medium transition-[transform,opacity] duration-200 ease-linear motion-reduce:transition-none group-data-[collapsible=icon]:-translate-y-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 flex shrink-0 items-center outline-hidden [&>svg]:shrink-0", className) }, props),
		render,
		state: {
			slot: "sidebar-group-label",
			sidebar: "group-label"
		}
	});
}
SidebarGroupLabel.displayName = "SidebarGroupLabel";
function SidebarGroupAction({ className, render, ...props }) {
	return useRender({
		defaultTagName: "button",
		props: mergeProps({ className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 end-3 w-5 rounded-md p-0 focus-visible:ring-2 [&>svg]:size-4 flex aspect-square items-center justify-center outline-hidden transition-transform motion-reduce:transition-none [&>svg]:shrink-0 after:absolute after:-inset-2 group-data-[collapsible=icon]:hidden", className) }, props),
		render,
		state: {
			slot: "sidebar-group-action",
			sidebar: "group-action"
		}
	});
}
SidebarGroupAction.displayName = "SidebarGroupAction";
function SidebarGroupContent({ className, ...props }) {
	return /* @__PURE__ */ jsx("div", {
		"data-slot": "sidebar-group-content",
		"data-sidebar": "group-content",
		className: cn("text-sm w-full", className),
		...props
	});
}
SidebarGroupContent.displayName = "SidebarGroupContent";
function SidebarMenu({ className, ...props }) {
	return /* @__PURE__ */ jsx("ul", {
		"data-slot": "sidebar-menu",
		"data-sidebar": "menu",
		className: cn("gap-[var(--sidebar-gap,0.5rem)] flex w-full min-w-0 flex-col", className),
		...props
	});
}
SidebarMenu.displayName = "SidebarMenu";
function SidebarMenuItem({ className, ...props }) {
	return /* @__PURE__ */ jsx("li", {
		"data-slot": "sidebar-menu-item",
		"data-sidebar": "menu-item",
		className: cn("group/menu-item relative", className),
		...props
	});
}
SidebarMenuItem.displayName = "SidebarMenuItem";
var sidebarMenuButtonVariants = cva("ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground gap-2 rounded-md p-2 text-left text-sm transition-[width,height,padding] motion-reduce:transition-none group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 data-active:font-medium peer/menu-button flex w-full items-center overflow-hidden outline-hidden group/menu-button disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&_svg]:size-4 [&_svg]:shrink-0", {
	variants: {
		variant: {
			default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
			outline: "bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"
		},
		size: {
			default: "min-h-11 text-sm",
			sm: "min-h-8 text-xs",
			lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
		}
	},
	defaultVariants: {
		variant: "default",
		size: "default"
	}
});
function SidebarMenuButton({ render, isActive = false, variant = "default", size = "default", tooltip, className, ...props }) {
	const { isMobile, state } = useSidebar();
	const comp = useRender({
		defaultTagName: "button",
		props: mergeProps({ className: cn(sidebarMenuButtonVariants({
			variant,
			size
		}), className) }, props),
		render: !tooltip ? render : TooltipTrigger,
		state: {
			slot: "sidebar-menu-button",
			sidebar: "menu-button",
			size,
			active: isActive
		}
	});
	if (!tooltip) return comp;
	if (typeof tooltip === "string") tooltip = { children: tooltip };
	return /* @__PURE__ */ jsxs(Tooltip, { children: [comp, /* @__PURE__ */ jsx(TooltipPopup, {
		side: "right",
		align: "center",
		hidden: state !== "collapsed" || isMobile,
		...tooltip
	})] });
}
SidebarMenuButton.displayName = "SidebarMenuButton";
function SidebarMenuAction({ className, render, showOnHover = false, ...props }) {
	return useRender({
		defaultTagName: "button",
		props: mergeProps({ className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 aspect-square w-5 rounded-md p-0 peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 focus-visible:ring-2 [&>svg]:size-4 flex items-center justify-center outline-hidden transition-transform motion-reduce:transition-none group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 [&>svg]:shrink-0", showOnHover && "peer-data-active/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-open:opacity-100 md:opacity-0", className) }, props),
		render,
		state: {
			slot: "sidebar-menu-action",
			sidebar: "menu-action"
		}
	});
}
SidebarMenuAction.displayName = "SidebarMenuAction";
function SidebarMenuBadge({ className, ...props }) {
	return /* @__PURE__ */ jsx("div", {
		"data-slot": "sidebar-menu-badge",
		"data-sidebar": "menu-badge",
		className: cn("text-sidebar-foreground peer-hover/menu-button:text-sidebar-accent-foreground peer-data-active/menu-button:text-sidebar-accent-foreground pointer-events-none absolute end-1 flex h-5 min-w-5 rounded-md px-1 text-xs font-medium peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 flex items-center justify-center tabular-nums select-none group-data-[collapsible=icon]:hidden", className),
		...props
	});
}
SidebarMenuBadge.displayName = "SidebarMenuBadge";
function SidebarMenuSkeleton({ className, showIcon = false, ...props }) {
	const [width] = React.useState(() => {
		return `${Math.floor(Math.random() * 40) + 50}%`;
	});
	return /* @__PURE__ */ jsxs("div", {
		"data-slot": "sidebar-menu-skeleton",
		"data-sidebar": "menu-skeleton",
		className: cn("h-8 gap-2 rounded-md px-2 flex items-center", className),
		...props,
		children: [showIcon && /* @__PURE__ */ jsx(Skeleton, {
			className: "size-4 rounded-md",
			"data-sidebar": "menu-skeleton-icon"
		}), /* @__PURE__ */ jsx(Skeleton, {
			className: "h-4 max-w-(--skeleton-width) flex-1",
			"data-sidebar": "menu-skeleton-text",
			style: { "--skeleton-width": width }
		})]
	});
}
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
function SidebarNavSkeleton({ className, ...props }) {
	return /* @__PURE__ */ jsxs("div", {
		"data-slot": "sidebar-nav-skeleton",
		"data-sidebar": "nav-skeleton",
		className: cn("flex h-10 w-full items-center gap-3 rounded-md px-3 py-2", "group-data-[collapsible=icon]:h-11 group-data-[collapsible=icon]:w-[76px] group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0 group-data-[collapsible=icon]:py-3", className),
		...props,
		children: [/* @__PURE__ */ jsx(Skeleton, { className: "size-5 shrink-0 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 flex-1 group-data-[collapsible=icon]:hidden" })]
	});
}
SidebarNavSkeleton.displayName = "SidebarNavSkeleton";
function SidebarAccountSkeleton({ className, ...props }) {
	return /* @__PURE__ */ jsxs("div", {
		"data-slot": "sidebar-account-skeleton",
		"data-sidebar": "account-skeleton",
		className: cn("flex w-full items-center gap-2 rounded-md p-2", className),
		...props,
		children: [/* @__PURE__ */ jsx(Skeleton, { className: "size-8 shrink-0 rounded-lg" }), /* @__PURE__ */ jsxs("div", {
			className: "flex flex-1 flex-col gap-1 group-data-[collapsible=icon]:hidden",
			children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-20" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-16" })]
		})]
	});
}
SidebarAccountSkeleton.displayName = "SidebarAccountSkeleton";
function SidebarMenuSub({ className, ...props }) {
	return /* @__PURE__ */ jsx("ul", {
		"data-slot": "sidebar-menu-sub",
		"data-sidebar": "menu-sub",
		className: cn("border-sidebar-border mx-3.5 translate-x-px gap-[var(--sidebar-gap,0.5rem)] border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden flex min-w-0 flex-col", className),
		...props
	});
}
SidebarMenuSub.displayName = "SidebarMenuSub";
function SidebarMenuSubItem({ className, ...props }) {
	return /* @__PURE__ */ jsx("li", {
		"data-slot": "sidebar-menu-sub-item",
		"data-sidebar": "menu-sub-item",
		className: cn("group/menu-sub-item relative", className),
		...props
	});
}
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
function SidebarMenuSubButton({ render, size = "md", isActive = false, className, ...props }) {
	return useRender({
		defaultTagName: "a",
		props: mergeProps({ className: cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground min-h-9 gap-2 rounded-md px-2 focus-visible:ring-2 data-[size=md]:text-sm data-[size=sm]:text-xs [&>svg]:size-4 flex min-w-0 -translate-x-px items-center overflow-hidden outline-hidden group-data-[collapsible=icon]:hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:shrink-0", className) }, props),
		render,
		state: {
			slot: "sidebar-menu-sub-button",
			sidebar: "menu-sub-button",
			size,
			active: isActive
		}
	});
}
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
/**
* Sidebar compound component with dot notation access to all parts.
*
* Usage:
* - `Sidebar.Root` - Main sidebar container (alias for Sidebar)
* - `Sidebar.Header` - Header section
* - `Sidebar.Content` - Scrollable content area
* - `Sidebar.Footer` - Footer section
* - `Sidebar.Group` - Group container for menu items
* - `Sidebar.GroupLabel` - Label for a group
* - `Sidebar.GroupContent` - Content within a group
* - `Sidebar.GroupAction` - Action button for a group
* - `Sidebar.Menu` - Menu container
* - `Sidebar.MenuItem` - Menu item wrapper
* - `Sidebar.MenuButton` - Clickable menu button
* - `Sidebar.MenuAction` - Action within a menu item
* - `Sidebar.MenuBadge` - Badge within a menu item
* - `Sidebar.MenuSkeleton` - Loading skeleton for menu
* - `Sidebar.MenuSub` - Submenu container
* - `Sidebar.MenuSubItem` - Submenu item
* - `Sidebar.MenuSubButton` - Submenu button
* - `Sidebar.Input` - Input within sidebar
* - `Sidebar.Separator` - Visual separator
* - `Sidebar.Rail` - Resize/toggle rail
* - `Sidebar.Inset` - Main content inset area
* - `Sidebar.Trigger` - Toggle button
*/
var SidebarCompound = Object.assign(Sidebar, {
	Root: Sidebar,
	Header: SidebarHeader,
	Content: SidebarContent,
	Footer: SidebarFooter,
	Group: SidebarGroup,
	GroupLabel: SidebarGroupLabel,
	GroupContent: SidebarGroupContent,
	GroupAction: SidebarGroupAction,
	Menu: SidebarMenu,
	MenuItem: SidebarMenuItem,
	MenuButton: SidebarMenuButton,
	MenuAction: SidebarMenuAction,
	MenuBadge: SidebarMenuBadge,
	MenuSkeleton: SidebarMenuSkeleton,
	MenuSub: SidebarMenuSub,
	MenuSubItem: SidebarMenuSubItem,
	MenuSubButton: SidebarMenuSubButton,
	Input: SidebarInput,
	Separator: SidebarSeparator,
	Rail: SidebarRail,
	Inset: SidebarInset,
	Trigger: SidebarTrigger,
	NavSkeleton: SidebarNavSkeleton,
	AccountSkeleton: SidebarAccountSkeleton
});
//#endregion
export { SidebarAccountSkeleton, SidebarCompound, SidebarContent, SidebarContext, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarNavSkeleton, SidebarProvider, SidebarTrigger, useSidebar };

//# sourceMappingURL=index472.js.map