/** * PropertyStatus Enum * Backend values are numeric (0, 1, 2) * Used in: PropertyInformation.status */ const PropertyStatus = Object.freeze({ AVAILABLE: 0, BOOKED: 1, MAINTENANCE: 2, }); // Map numeric value → Arabic label const PropertyStatusLabels = Object.freeze({ [PropertyStatus.AVAILABLE]: 'متاح', [PropertyStatus.BOOKED]: 'محجوز', [PropertyStatus.MAINTENANCE]: 'صيانة', }); // Map numeric value → English key (for UI filters) const PropertyStatusKeys = Object.freeze({ [PropertyStatus.AVAILABLE]: 'available', [PropertyStatus.BOOKED]: 'booked', [PropertyStatus.MAINTENANCE]: 'maintenance', }); // Reverse map: English key → numeric value const PropertyStatusByKey = Object.freeze({ available: PropertyStatus.AVAILABLE, booked: PropertyStatus.BOOKED, maintenance: PropertyStatus.MAINTENANCE, }); export { PropertyStatus, PropertyStatusLabels, PropertyStatusKeys, PropertyStatusByKey };