import React, { useState } from 'react'; import { Card, CardContent } from '@/src/components/ui/Card'; import { Input } from '@/src/components/ui/Input'; import { Button } from '@/src/components/ui/Button'; import { Badge } from '@/src/components/ui/Badge'; import { Search, Filter, FileText, Download, Eye, MessageSquare, Calendar, Building } from 'lucide-react'; import { useNavigate } from 'react-router-dom'; const documents = [ { id: 'GR-2023-01', title: 'Guidelines for Flood Management and Evacuation Procedures', type: 'GR', department: 'Disaster Management', date: '2023-06-15', summary: 'Comprehensive guidelines for district administrations regarding flood preparedness, evacuation protocols, and relief camp management.' }, { id: 'ACT-1976', title: 'Maharashtra Irrigation Act, 1976', type: 'Act', department: 'Water Resources', date: '1976-08-05', summary: 'An Act to unify and amend the law relating to irrigation in the State of Maharashtra.' }, { id: 'CIR-2024-45', title: 'Standard Operating Procedure for Dam Gate Operations during Monsoon', type: 'Circular', department: 'Water Resources', date: '2024-05-10', summary: 'Updated SOPs for dam engineers regarding phased water discharge and coordination with downstream authorities.' }, { id: 'GR-2022-89', title: 'Compensation Policy for Crop Damage due to Floods', type: 'GR', department: 'Revenue & Forest', date: '2022-09-22', summary: 'Revised compensation rates and assessment methodology for agricultural losses caused by natural calamities including floods.' }, { id: 'ACT-2005', title: 'Maharashtra Water Resources Regulatory Authority Act, 2005', type: 'Act', department: 'Water Resources', date: '2005-05-04', summary: 'Act to provide for the establishment of the Maharashtra Water Resources Regulatory Authority to regulate water resources within the State.' }, ]; export function Repository() { const [searchQuery, setSearchQuery] = useState(''); const [activeFilter, setActiveFilter] = useState('All'); const navigate = useNavigate(); const filteredDocs = documents.filter(doc => { const matchesSearch = doc.title.toLowerCase().includes(searchQuery.toLowerCase()) || doc.id.toLowerCase().includes(searchQuery.toLowerCase()); const matchesFilter = activeFilter === 'All' || doc.type === activeFilter; return matchesSearch && matchesFilter; }); const handleAskAI = (docTitle: string) => { navigate(`/ai-assistant?q=Summarize the key points of ${encodeURIComponent(docTitle)}`); }; return (

Centralized Repository

Search and access GRs, Acts, and Circulars

setSearchQuery(e.target.value)} />
{['All', 'GR', 'Act', 'Circular'].map(filter => ( setActiveFilter(filter)} > {filter} ))}
{filteredDocs.map((doc) => (
{doc.type} {doc.id}

{doc.title}

{doc.summary}

{doc.department}
{doc.date}
))} {filteredDocs.length === 0 && (

No documents found

Try adjusting your search or filters.

)}
); }