'use client'; import { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { useTranslation } from 'react-i18next'; import { Search, MapPin, Bed, Bath, Square, DollarSign, Filter, Grid3x3, List, Heart, Share2, ChevronDown, Star, Camera, Home, Building2, Trees, Waves, Warehouse, Sparkles, Shield, Calendar, Phone, Mail, MessageCircle } from 'lucide-react'; import Image from 'next/image'; import Link from 'next/link'; const PropertyCard = ({ property, viewMode = 'grid' }) => { const [isFavorite, setIsFavorite] = useState(false); const [currentImage, setCurrentImage] = useState(0); const formatCurrency = (amount) => { return amount?.toLocaleString() + ' ل.س'; }; const getPropertyTypeIcon = (type) => { switch(type) { case 'villa': return ; case 'apartment': return ; case 'house': return ; case 'studio': return ; default: return ; } }; const getPropertyTypeLabel = (type) => { switch(type) { case 'villa': return 'فيلا'; case 'apartment': return 'شقة'; case 'house': return 'بيت'; case 'studio': return 'استوديو'; default: return type; } }; if (viewMode === 'list') { return (
{property.title} {property.images.length > 1 && (
{property.images.map((_, idx) => (
)}
{property.isNew && (
جديد
)}
{getPropertyTypeIcon(property.type)} {getPropertyTypeLabel(property.type)} {property.status === 'available' ? 'متاح' : 'محجوز'}

{property.title}

{property.location.city}، {property.location.district}
{formatCurrency(property.price)}
/{property.priceUnit === 'daily' ? 'يوم' : 'شهر'}
{property.bedrooms} غرف
{property.bathrooms} حمامات
{property.area} م²

{property.description}

{property.features.slice(0, 4).map((feature, idx) => ( {feature} ))} {property.features.length > 4 && ( +{property.features.length - 4} )}
عرض التفاصيل
); } return (
{property.title} {property.images.length > 1 && (
{property.images.map((_, idx) => (
)}
{property.isNew && (
جديد
)}
{getPropertyTypeIcon(property.type)} {getPropertyTypeLabel(property.type)} {property.status === 'available' && ( متاح )}

{property.title}

{property.location.city}، {property.location.district}
{formatCurrency(property.price)}
/{property.priceUnit === 'daily' ? 'يوم' : 'شهر'}
{property.bedrooms}
{property.bathrooms}
{property.area}م²
{property.rating || 4.5}
{property.features.slice(0, 3).map((feature, idx) => ( {feature} ))} {property.features.length > 3 && ( +{property.features.length - 3} )}
عرض التفاصيل
); }; const FilterBar = ({ filters, onFilterChange }) => { const [showFilters, setShowFilters] = useState(false); const propertyTypes = [ { id: 'all', label: 'الكل' }, { id: 'apartment', label: 'شقة', icon: Building2 }, { id: 'villa', label: 'فيلا', icon: Home }, { id: 'house', label: 'بيت', icon: Home }, { id: 'studio', label: 'استوديو', icon: Building2 } ]; const priceRanges = [ { id: 'all', label: 'جميع الأسعار' }, { id: '0-500000', label: 'أقل من 500,000' }, { id: '500000-1000000', label: '500,000 - 1,000,000' }, { id: '1000000-2000000', label: '1,000,000 - 2,000,000' }, { id: '2000000-5000000', label: '2,000,000 - 5,000,000' }, { id: '5000000+', label: 'أكثر من 5,000,000' } ]; const cities = [ { id: 'all', label: 'جميع المدن' }, { id: 'damascus', label: 'دمشق' }, { id: 'aleppo', label: 'حلب' }, { id: 'homs', label: 'حمص' }, { id: 'latakia', label: 'اللاذقية' }, { id: 'daraa', label: 'درعا' } ]; return (
onFilterChange({ ...filters, search: e.target.value })} />
{showFilters && (
{propertyTypes.map((type) => { const Icon = type.icon; return ( ); })}
onFilterChange({ ...filters, minArea: e.target.value })} /> onFilterChange({ ...filters, maxArea: e.target.value })} />
{['مسبح', 'حديقة', 'موقف سيارات', 'أمن', 'مصعد', 'تكييف'].map((feature) => ( ))}
)}
); }; export default function PropertiesPage() { const [viewMode, setViewMode] = useState('grid'); const [sortBy, setSortBy] = useState('newest'); const [filters, setFilters] = useState({ search: '', propertyType: 'all', city: 'all', priceRange: 'all', bedrooms: 'all', minArea: '', maxArea: '', features: [] }); const [properties] = useState([ { id: 1, title: 'فيلا فاخرة في المزة', description: 'فيلا فاخرة مع حديقة خاصة ومسبح في أفضل أحياء دمشق.', type: 'villa', price: 500000, priceUnit: 'daily', location: { city: 'دمشق', district: 'المزة' }, bedrooms: 5, bathrooms: 4, area: 450, features: ['مسبح', 'حديقة خاصة', 'موقف سيارات', 'أمن'], images: ['/villa1.jpg'], status: 'available', rating: 4.8, isNew: true }, { id: 2, title: 'شقة حديثة في الشهباء', description: 'شقة عصرية في حي الشهباء الراقي بحلب.', type: 'apartment', price: 250000, priceUnit: 'daily', location: { city: 'حلب', district: 'الشهباء' }, bedrooms: 3, bathrooms: 2, area: 180, features: ['مطبخ مجهز', 'بلكونة', 'موقف سيارات', 'مصعد'], images: ['/apartment1.jpg'], status: 'available', rating: 4.5, isNew: false }, { id: 3, title: 'بيت عائلي في بابا عمرو', description: 'بيت واسع مناسب للعائلات في حمص.', type: 'house', price: 350000, priceUnit: 'daily', location: { city: 'حمص', district: 'بابا عمرو' }, bedrooms: 4, bathrooms: 3, area: 300, features: ['حديقة كبيرة', 'موقف سيارات', 'مدفأة'], images: ['/house1.jpg'], status: 'booked', rating: 4.3, isNew: false }, { id: 4, title: 'شقة بجانب البحر', description: 'شقة رائعة مع إطلالة بحرية في اللاذقية.', type: 'apartment', price: 300000, priceUnit: 'daily', location: { city: 'اللاذقية', district: 'الشاطئ الأزرق' }, bedrooms: 3, bathrooms: 2, area: 200, features: ['إطلالة بحرية', 'شرفة', 'تكييف'], images: ['/seaside1.jpg'], status: 'available', rating: 4.9, isNew: true }, { id: 5, title: 'فيلا في درعا', description: 'فيلا فاخرة في حي الأطباء بدرعا.', type: 'villa', price: 400000, priceUnit: 'daily', location: { city: 'درعا', district: 'حي الأطباء' }, bedrooms: 4, bathrooms: 3, area: 350, features: ['حديقة مثمرة', 'أنظمة أمن', 'مسبح'], images: ['/villa4.jpg'], status: 'available', rating: 4.6, isNew: false } ]); const filteredProperties = properties .filter(property => { if (filters.search && !property.title.includes(filters.search) && !property.description.includes(filters.search)) { return false; } if (filters.propertyType !== 'all' && property.type !== filters.propertyType) { return false; } if (filters.city !== 'all' && property.location.city !== filters.city) { return false; } if (filters.priceRange !== 'all') { const [min, max] = filters.priceRange.split('-'); if (max) { if (property.price < parseInt(min) || property.price > parseInt(max)) return false; } else if (filters.priceRange.endsWith('+')) { const min = parseInt(filters.priceRange.replace('+', '')); if (property.price < min) return false; } } if (filters.bedrooms !== 'all' && property.bedrooms < parseInt(filters.bedrooms)) { return false; } if (filters.minArea && property.area < parseInt(filters.minArea)) return false; if (filters.maxArea && property.area > parseInt(filters.maxArea)) return false; if (filters.features.length > 0) { if (!filters.features.every(f => property.features.includes(f))) return false; } return true; }) .sort((a, b) => { switch(sortBy) { case 'price_asc': return a.price - b.price; case 'price_desc': return b.price - a.price; case 'rating': return b.rating - a.rating; default: return b.isNew ? 1 : -1; } }); return (

عقارات للإيجار

أفضل العقارات في سوريا

{filteredProperties.length} عقار متاح
{filteredProperties.map((property) => ( ))}
{filteredProperties.length === 0 && (

لا توجد عقارات

جرب تغيير معايير البحث

)}
); }