"use client";

import { useSidebar } from "@/components/ui/sidebar";

export function SidebarOverlay() {
  const { open, isMobile, toggleSidebar } = useSidebar();
  if (isMobile || !open) return null;
  return (
    <div
      className="fixed inset-0 z-[9] bg-black/20"
      onClick={toggleSidebar}
    />
  );
}
