'use client'; import { useState } from 'react'; import { motion } from 'framer-motion'; import { Edit, Trash2, Eye, MapPin, Bed, Bath, Square, DollarSign, Percent, MoreVertical } from 'lucide-react'; export default function PropertiesTable() { const [properties, setProperties] = useState([ { id: 1, title: 'luxuryVillaDamascus', type: 'villa', location: 'دمشق, المزة', price: 500000, commission: 5, commissionType: 'من المالك', bedrooms: 5, bathrooms: 4, area: 450, status: 'available', bookings: 3 }, { id: 2, title: 'modernApartmentAleppo', type: 'apartment', location: 'حلب, الشهباء', price: 250000, commission: 7, commissionType: 'من المستأجر', bedrooms: 3, bathrooms: 2, area: 180, status: 'booked', bookings: 1 } ]); const formatCurrency = (amount) => { return amount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + ' ل.س'; }; const getStatusBadge = (status) => { const styles = { available: 'bg-green-100 text-green-800', booked: 'bg-red-100 text-red-800', maintenance: 'bg-yellow-100 text-yellow-800' }; const labels = { available: 'متاح', booked: 'محجوز', maintenance: 'صيانة' }; return ( {labels[status]} ); }; return (
{properties.map((property, index) => ( ))}
العقار الموقع السعر/يوم العمولة المصدر التفاصيل الحالة الإجراءات
{property.title}
{property.type}
{property.location}
{formatCurrency(property.price)}
{property.commission}%
{property.commissionType}
{property.bedrooms} {property.bathrooms} {property.area}m²
{getStatusBadge(property.status)}
{properties.length === 0 && (

لا توجد عقارات مضافة بعد

)}
); }