"use client"
import React, { useState } from "react"
import { AlertTriangle, BarChart, ChevronRight, MapPin, Skull, Shield, FileText } from "lucide-react"
import { Separator } from "@/app/_components/ui/separator"
import { Card, CardContent, CardHeader, CardTitle } from "@/app/_components/ui/card"
import { cn } from "@/app/_lib/utils"
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/app/_components/ui/tabs"
interface CrimeSidebarProps {
className?: string
defaultCollapsed?: boolean
}
export default function CrimeSidebar({ className, defaultCollapsed = true }: CrimeSidebarProps) {
const [isCollapsed, setIsCollapsed] = useState(defaultCollapsed)
const [activeTab, setActiveTab] = useState("incidents")
return (
{/* Main Sidebar Content */}
Crime Analysis
Incidents
Statistics
Reports
}>
{[1, 2, 3, 4, 5, 6].map((i) => (
))}
}>
}>
}>
{/* Toggle Button - always visible and positioned correctly */}
)
}
// Helper components for sidebar content
interface SidebarSectionProps {
title: string
children: React.ReactNode
icon?: React.ReactNode
}
function SidebarSection({ title, children, icon }: SidebarSectionProps) {
return (
{icon}
{title}
{children}
)
}
function IncidentCard() {
return (
Theft reported at Jalan Srikandi
Jombang District
3 hours ago
)
}
interface StatCardProps {
title: string
value: string
change: string
isPositive?: boolean
}
function StatCard({ title, value, change, isPositive = false }: StatCardProps) {
return (
{title}
{change}
{value}
)
}
interface CrimeTypeCardProps {
type: string
count: number
percentage: number
}
function CrimeTypeCard({ type, count, percentage }: CrimeTypeCardProps) {
return (
{type}
{count} cases
{percentage}%
)
}
interface ReportCardProps {
title: string
date: string
author: string
}
function ReportCard({ title, date, author }: ReportCardProps) {
return (
)
}