import React, { useState } from 'react'; import { Globe, Search, MapPin, Users, Heart, Building2, Phone, Mail, ExternalLink, ChevronDown, ChevronUp, CheckCircle, Star, Filter, Handshake, TreePine, BookOpen, Utensils, Paintbrush } from 'lucide-react'; interface CommunityOrg { id: string; name: string; category: string; description: string; address: string; phone: string; email: string; website: string; distance: string; opportunities: string[]; partnershipType: 'community-service' | 'school-partnership' | 'both'; ageGroups: string[]; rating: number; featured: boolean; } const COMMUNITY_DATA: CommunityOrg[] = [ { id: '1', name: 'Sunshine Food Bank', category: 'Food & Nutrition', description: 'Local food bank providing meals and groceries to families in need. Students can help sort donations, pack meal kits, and assist with distribution events.', address: '1420 Community Blvd, Phoenix, AZ 85001', phone: '(602) 555-0142', email: 'volunteer@sunshinefoodbank.org', website: 'sunshinefoodbank.org', distance: '2.3 mi', opportunities: ['Food sorting & packing', 'Distribution day volunteers', 'Holiday meal drive', 'Garden maintenance'], partnershipType: 'both', ageGroups: ['K-2', '3-5', '6-8'], rating: 5, featured: true }, { id: '2', name: 'Desert Bloom Animal Shelter', category: 'Animal Welfare', description: 'No-kill animal shelter that welcomes student volunteers for socialization programs. Great sensory-friendly environment for students with autism.', address: '890 Paw Print Lane, Phoenix, AZ 85003', phone: '(602) 555-0198', email: 'education@desertbloom.org', website: 'desertbloomshelter.org', distance: '3.1 mi', opportunities: ['Animal socialization visits', 'Pet supply drives', 'Kennel decoration projects', 'Reading to animals program'], partnershipType: 'both', ageGroups: ['3-5', '6-8'], rating: 5, featured: true }, { id: '3', name: 'Valley Senior Living Center', category: 'Senior Services', description: 'Assisted living facility offering intergenerational programs. Students visit weekly to share crafts, music, and conversation with residents.', address: '2100 Golden Years Dr, Phoenix, AZ 85004', phone: '(602) 555-0167', email: 'activities@valleysenior.com', website: 'valleyseniorliving.com', distance: '1.8 mi', opportunities: ['Weekly craft sessions', 'Music & performance visits', 'Holiday card making', 'Garden buddies program'], partnershipType: 'community-service', ageGroups: ['K-2', '3-5', '6-8'], rating: 4, featured: false }, { id: '4', name: 'Phoenix Public Library — East Branch', category: 'Education & Literacy', description: 'Local library branch with dedicated programs for special needs students. Offers sensory-friendly story times and adaptive technology workshops.', address: '3500 E McDowell Rd, Phoenix, AZ 85008', phone: '(602) 555-0134', email: 'eastbranch@phoenixlib.org', website: 'phoenixpubliclibrary.org', distance: '4.2 mi', opportunities: ['Book drive coordination', 'Reading buddy program', 'Library shelf organization', 'Story time assistants'], partnershipType: 'school-partnership', ageGroups: ['K-2', '3-5'], rating: 4, featured: false }, { id: '5', name: 'Habitat for Humanity — Phoenix Chapter', category: 'Housing & Construction', description: 'Building homes for families in need. Age-appropriate volunteer tasks available including painting, landscaping, and supply organization.', address: '780 Builder Way, Phoenix, AZ 85006', phone: '(602) 555-0189', email: 'volunteer@habitatphx.org', website: 'habitatphoenix.org', distance: '5.6 mi', opportunities: ['Supply sorting', 'Painting projects', 'Landscaping days', 'Fundraiser events'], partnershipType: 'community-service', ageGroups: ['6-8'], rating: 5, featured: true }, { id: '6', name: 'Desert Botanical Garden', category: 'Environment & Nature', description: 'Beautiful botanical garden offering educational partnerships and volunteer opportunities focused on desert ecology and conservation.', address: '1201 N Galvin Pkwy, Phoenix, AZ 85008', phone: '(602) 555-0156', email: 'education@dbg.org', website: 'dbg.org', distance: '6.1 mi', opportunities: ['Trail cleanup days', 'Seed planting workshops', 'Nature journaling', 'Butterfly garden maintenance'], partnershipType: 'both', ageGroups: ['K-2', '3-5', '6-8'], rating: 5, featured: false }, { id: '7', name: 'Special Olympics Arizona', category: 'Sports & Recreation', description: 'Year-round sports training and athletic competition for individuals with intellectual disabilities. Partnership opportunities for unified sports.', address: '2100 S 75th Ave, Phoenix, AZ 85043', phone: '(602) 555-0145', email: 'programs@soaz.org', website: 'specialolympicsarizona.org', distance: '8.4 mi', opportunities: ['Unified sports events', 'Cheer squad support', 'Event setup volunteers', 'Athlete buddy program'], partnershipType: 'school-partnership', ageGroups: ['3-5', '6-8'], rating: 5, featured: true }, { id: '8', name: 'Community Arts Center', category: 'Arts & Culture', description: 'Inclusive arts center offering adaptive art classes and exhibition opportunities. Students can participate in collaborative murals and gallery shows.', address: '456 Creative Ave, Phoenix, AZ 85007', phone: '(602) 555-0178', email: 'info@communityarts.org', website: 'communityartsphx.org', distance: '3.7 mi', opportunities: ['Collaborative mural projects', 'Art supply drives', 'Gallery exhibition setup', 'Adaptive art workshops'], partnershipType: 'both', ageGroups: ['K-2', '3-5', '6-8'], rating: 4, featured: false }, { id: '9', name: 'Ronald McDonald House', category: 'Family Support', description: 'Provides housing and support for families with children receiving medical treatment. Students can help with meal preparation and activity kits.', address: '501 E Thomas Rd, Phoenix, AZ 85012', phone: '(602) 555-0123', email: 'volunteer@rmhcphx.org', website: 'rmhcphoenix.org', distance: '4.9 mi', opportunities: ['Meal preparation', 'Activity kit assembly', 'Holiday decoration', 'Card writing campaigns'], partnershipType: 'community-service', ageGroups: ['3-5', '6-8'], rating: 5, featured: false }, { id: '10', name: 'Neighborhood Cleanup Coalition', category: 'Environment & Nature', description: 'Organizes monthly neighborhood beautification projects. Great for teaching environmental responsibility and community pride.', address: 'Various locations, Phoenix, AZ', phone: '(602) 555-0190', email: 'join@cleanupcoalition.org', website: 'phxcleanup.org', distance: '1.0 mi', opportunities: ['Monthly park cleanups', 'Recycling drives', 'Community garden planting', 'Mural painting'], partnershipType: 'community-service', ageGroups: ['K-2', '3-5', '6-8'], rating: 4, featured: false }, ]; const categoryIcons: Record = { 'Food & Nutrition': , 'Animal Welfare': , 'Senior Services': , 'Education & Literacy': , 'Housing & Construction': , 'Environment & Nature': , 'Sports & Recreation': , 'Arts & Culture': , 'Family Support': , }; const CommunityService: React.FC = () => { const [searchQuery, setSearchQuery] = useState(''); const [categoryFilter, setCategoryFilter] = useState('all'); const [typeFilter, setTypeFilter] = useState<'all' | 'community-service' | 'school-partnership' | 'both'>('all'); const [ageFilter, setAgeFilter] = useState('all'); const [expandedOrg, setExpandedOrg] = useState(null); const [savedOrgs, setSavedOrgs] = useState>(new Set()); const [showFilters, setShowFilters] = useState(false); const categories = [...new Set(COMMUNITY_DATA.map(o => o.category))]; const filteredOrgs = COMMUNITY_DATA.filter(org => { const matchesSearch = searchQuery === '' || org.name.toLowerCase().includes(searchQuery.toLowerCase()) || org.description.toLowerCase().includes(searchQuery.toLowerCase()) || org.category.toLowerCase().includes(searchQuery.toLowerCase()); const matchesCategory = categoryFilter === 'all' || org.category === categoryFilter; const matchesType = typeFilter === 'all' || org.partnershipType === typeFilter || org.partnershipType === 'both'; const matchesAge = ageFilter === 'all' || org.ageGroups.includes(ageFilter); return matchesSearch && matchesCategory && matchesType && matchesAge; }); const toggleSave = (id: string) => { const next = new Set(savedOrgs); if (next.has(id)) next.delete(id); else next.add(id); setSavedOrgs(next); }; const typeColors: Record = { 'community-service': 'bg-emerald-500/15 text-emerald-400 border-emerald-500/30', 'school-partnership': 'bg-blue-500/15 text-blue-400 border-blue-500/30', 'both': 'bg-violet-500/15 text-violet-400 border-violet-500/30', }; const typeLabels: Record = { 'community-service': 'Community Service', 'school-partnership': 'School Partnership', 'both': 'Service & Partnership', }; return (
{/* Header */}

Community Service & School Partnerships

Discover local organizations for community service projects and school partnership opportunities

{/* Info Banner */}

Building Community Connections

Explore local organizations that welcome school partnerships and community service projects. These opportunities help students develop social skills, build confidence, and contribute meaningfully to their community.

{/* Search & Filters */}
setSearchQuery(e.target.value)} placeholder="Search organizations, categories, or keywords..." className="w-full pl-9 pr-4 py-2.5 bg-slate-700/50 border border-slate-600/50 rounded-xl text-sm text-white placeholder-slate-500 focus:ring-2 focus:ring-green-500/50 focus:border-green-500/50 outline-none" />
{showFilters && (
)}
{/* Stats Bar */}
{[ { label: 'Organizations', value: COMMUNITY_DATA.length.toString(), color: 'from-green-500 to-emerald-600', icon: }, { label: 'Service Projects', value: COMMUNITY_DATA.filter(o => o.partnershipType !== 'school-partnership').length.toString(), color: 'from-emerald-500 to-teal-600', icon: }, { label: 'School Partners', value: COMMUNITY_DATA.filter(o => o.partnershipType !== 'community-service').length.toString(), color: 'from-blue-500 to-indigo-600', icon: }, { label: 'Saved', value: savedOrgs.size.toString(), color: 'from-amber-500 to-orange-600', icon: }, ].map((stat, i) => (
{stat.icon}

{stat.value}

{stat.label}

))}
{/* Results */}

{filteredOrgs.length} organization{filteredOrgs.length !== 1 ? 's' : ''} found

{filteredOrgs.map(org => (
setExpandedOrg(expandedOrg === org.id ? null : org.id)} >
{categoryIcons[org.category] || }

{org.name}

{org.featured && ( FEATURED )}
{typeLabels[org.partnershipType]} {org.distance} {org.category}

{org.description}

{expandedOrg === org.id ? : }
{expandedOrg === org.id && (
{/* Contact Info */}

Contact Information

{org.address}
{org.phone}
{/* Opportunities */}

Available Opportunities

{org.opportunities.map((opp, i) => (
{opp}
))}
{/* Age Groups & Actions */}
Age Groups: {org.ageGroups.map(age => ( {age} ))}
)}
))} {filteredOrgs.length === 0 && (

No organizations found

Try adjusting your search or filters to find more opportunities.

)}
); }; export default CommunityService;