"use client" import { Button } from "@/components/ui/button" import { ScrollArea } from "@/components/ui/scroll-area" import Link from "next/link" import { cn } from "@/lib/utils" import { motion } from "framer-motion" import { ChevronLeft, ChevronRight } from "lucide-react" import { usePathname } from "next/navigation" import { useState } from "react" import { DASHBOARDS } from "../constant/index" type OrderStatus = "pending" | "processing" | "shipped" | "delivered" | "cancelled" interface SidebarProps { className?: string } export function Sidebar({ className }: SidebarProps) { const [isOpen, setIsOpen] = useState(false) const [activeFilter, setActiveFilter] = useState("all") const pathname = usePathname() const toggleSidebar = () => { setIsOpen(!isOpen) } const sidebarVariants = { open: { width: 280, opacity: 1, display: "block", transition: { duration: 0.4, ease: [0.25, 0.46, 0.45, 0.94], }, }, closed: { width: 0, opacity: 0, display: "none", transition: { duration: 0.4, ease: [0.25, 0.46, 0.45, 0.94], }, }, } const contentVariants = { open: { opacity: 1, x: 0, transition: { duration: 0.4, delay: 0.1, ease: [0.25, 0.46, 0.45, 0.94], }, }, closed: { opacity: 0, x: -20, transition: { duration: 0.3, }, }, } return ( <>
A

Admin Panel

Ecommerce Dashboard

JD

John Doe

john@example.com

{isOpen && ( )} ) }