export interface Service { id: string name: string description: string category: string basePrice: number duration: number // بالدقائق image: string features: string[] isEmergency?: boolean requirements?: string[] } export interface ServiceCategory { id: string name: string description: string image: string services: string[] // معرفات الخدمات } export interface ServiceRequest { id: string customerId: string serviceId: string plumberId?: string status: "pending" | "confirmed" | "in-progress" | "completed" | "cancelled" scheduledDate: string scheduledTime: string address: string phone: string description: string urgency: "low" | "medium" | "high" | "emergency" estimatedPrice?: number actualPrice?: number notes?: string createdAt: string updatedAt: string completedAt?: string rating?: number review?: string } export interface Plumber { id: string name: string email: string phone: string specializations: string[] experience: number rating: number reviewCount: number profileImage?: string isAvailable: boolean workingHours: { start: string end: string } serviceAreas: string[] pricePerHour: number completedJobs: number isVerified: boolean bio?: string certifications?: string[] } // فئات الخدمات export const serviceCategories: ServiceCategory[] = [ { id: "emergency", name: "خدمات الطوارئ", description: "خدمات عاجلة متاحة 24/7", image: "/placeholder.svg?key=emergency", services: ["emergency-leak", "emergency-blockage", "emergency-burst"], }, { id: "installation", name: "التركيب والتمديد", description: "تركيب وتمديد شبكات المياه والصرف", image: "/placeholder.svg?key=installation", services: ["pipe-installation", "fixture-installation", "water-heater-install"], }, { id: "repair", name: "الإصلاح والصيانة", description: "إصلاح الأعطال وصيانة دورية", image: "/placeholder.svg?key=repair", services: ["leak-repair", "pipe-repair", "fixture-repair"], }, { id: "cleaning", name: "التنظيف والتسليك", description: "تنظيف وتسليك المجاري والأنابيب", image: "/placeholder.svg?key=cleaning", services: ["drain-cleaning", "pipe-cleaning", "sewer-cleaning"], }, { id: "maintenance", name: "الصيانة الدورية", description: "صيانة وقائية منتظمة", image: "/placeholder.svg?key=maintenance", services: ["routine-maintenance", "inspection", "preventive-care"], }, ] // الخدمات المتاحة export const services: Service[] = [ { id: "emergency-leak", name: "إصلاح تسريب طارئ", description: "إصلاح فوري للتسريبات الطارئة في المواسير والوصلات", category: "emergency", basePrice: 200, duration: 60, image: "/placeholder.svg?key=leak-repair", features: ["خدمة 24/7", "وصول سريع خلال 30 دقيقة", "إصلاح فوري", "ضمان على الإصلاح"], isEmergency: true, requirements: ["وصف دقيق لمكان التسريب", "إغلاق المياه إن أمكن"], }, { id: "emergency-blockage", name: "تسليك مجاري طارئ", description: "تسليك فوري للمجاري والأنابيب المسدودة", category: "emergency", basePrice: 150, duration: 45, image: "/placeholder.svg?key=blockage", features: ["خدمة 24/7", "معدات متخصصة", "تسليك فوري", "تنظيف شامل"], isEmergency: true, }, { id: "pipe-installation", name: "تمديد مواسير جديدة", description: "تمديد شبكة مواسير المياه والصرف الصحي", category: "installation", basePrice: 500, duration: 240, image: "/placeholder.svg?key=pipe-install", features: ["مواد عالية الجودة", "تصميم مخصص", "اختبار الضغط", "ضمان 5 سنوات"], requirements: ["مخطط المكان", "تحديد نوع المواسير المطلوبة"], }, { id: "fixture-installation", name: "تركيب أدوات صحية", description: "تركيب أحواض، مراحيض، خلاطات، ودشات", category: "installation", basePrice: 300, duration: 120, image: "/placeholder.svg?key=fixture-install", features: ["تركيب احترافي", "اختبار التشغيل", "ضبط دقيق", "تنظيف بعد التركيب"], }, { id: "water-heater-install", name: "تركيب سخان مياه", description: "تركيب وتوصيل سخانات المياه الكهربائية والغاز", category: "installation", basePrice: 400, duration: 180, image: "/placeholder.svg?key=heater-install", features: ["تركيب آمن", "توصيل كهربائي", "اختبار الأمان", "ضمان التركيب"], requirements: ["نوع السخان", "مكان التركيب", "توفر نقطة كهرباء"], }, { id: "leak-repair", name: "إصلاح التسريبات", description: "إصلاح تسريبات المواسير والوصلات", category: "repair", basePrice: 120, duration: 90, image: "/placeholder.svg?key=leak-fix", features: ["تشخيص دقيق", "إصلاح محترف", "اختبار الإصلاح", "ضمان 6 أشهر"], }, { id: "drain-cleaning", name: "تنظيف المجاري", description: "تنظيف وتسليك مجاري الحمامات والمطابخ", category: "cleaning", basePrice: 100, duration: 60, image: "/placeholder.svg?key=drain-clean", features: ["معدات متخصصة", "تنظيف عميق", "إزالة الروائح", "نصائح الوقاية"], }, { id: "routine-maintenance", name: "صيانة دورية شاملة", description: "فحص وصيانة دورية لشبكة السباكة", category: "maintenance", basePrice: 250, duration: 150, image: "/placeholder.svg?key=maintenance", features: ["فحص شامل", "تقرير مفصل", "صيانة وقائية", "نصائح التوفير"], }, ] // السباكين المتاحين export const plumbers: Plumber[] = [ { id: "1", name: "أحمد محمد السباك", email: "ahmed@plumbers.com", phone: "01234567890", specializations: ["تسليك مجاري", "إصلاح تسريبات", "تركيب أدوات صحية"], experience: 8, rating: 4.9, reviewCount: 156, profileImage: "/placeholder.svg?key=plumber1", isAvailable: true, workingHours: { start: "08:00", end: "18:00" }, serviceAreas: ["القاهرة", "الجيزة", "القليوبية"], pricePerHour: 80, completedJobs: 234, isVerified: true, bio: "سباك محترف مع خبرة 8 سنوات في جميع أعمال السباكة. متخصص في الحالات الطارئة والتركيبات المعقدة.", certifications: ["شهادة السباكة المعتمدة", "دورة السلامة المهنية"], }, { id: "2", name: "محمد علي الخبير", email: "mohamed@plumbers.com", phone: "01987654321", specializations: ["تمديد مواسير", "تركيب سخانات", "صيانة دورية"], experience: 12, rating: 4.8, reviewCount: 203, profileImage: "/placeholder.svg?key=plumber2", isAvailable: true, workingHours: { start: "07:00", end: "19:00" }, serviceAreas: ["القاهرة", "الإسكندرية", "الدقهلية"], pricePerHour: 100, completedJobs: 387, isVerified: true, bio: "خبير سباكة مع 12 سنة خبرة. متخصص في التمديدات الجديدة والمشاريع الكبيرة.", certifications: ["ماجستير السباكة الصناعية", "شهادة ISO للجودة"], }, { id: "3", name: "خالد حسن المحترف", email: "khaled@plumbers.com", phone: "01555666777", specializations: ["طوارئ 24/7", "إصلاح سريع", "تسليك متقدم"], experience: 6, rating: 4.7, reviewCount: 89, profileImage: "/placeholder.svg?key=plumber3", isAvailable: true, workingHours: { start: "00:00", end: "23:59" }, // متاح 24/7 serviceAreas: ["القاهرة", "الجيزة"], pricePerHour: 90, completedJobs: 145, isVerified: true, bio: "متخصص في خدمات الطوارئ والحالات العاجلة. متاح على مدار الساعة لخدمتكم.", certifications: ["شهادة الطوارئ المعتمدة", "دورة الإسعافات الأولية"], }, ] // وظائف مساعدة export function getServicesByCategory(categoryId: string): Service[] { const category = serviceCategories.find((cat) => cat.id === categoryId) if (!category) return [] return services.filter((service) => category.services.includes(service.id)) } export function getServiceById(id: string): Service | undefined { return services.find((service) => service.id === id) } export function getPlumberById(id: string): Plumber | undefined { return plumbers.find((plumber) => plumber.id === id) } export function getAvailablePlumbers(serviceId: string, area: string): Plumber[] { const service = getServiceById(serviceId) if (!service) return [] return plumbers.filter( (plumber) => plumber.isAvailable && plumber.serviceAreas.some((serviceArea) => serviceArea.toLowerCase().includes(area.toLowerCase())), ) } export function getEmergencyServices(): Service[] { return services.filter((service) => service.isEmergency) } export function calculateEstimatedPrice(service: Service, plumber: Plumber): number { const baseCost = service.basePrice const laborCost = (service.duration / 60) * plumber.pricePerHour return baseCost + laborCost }