/**
 * BuildingType Enum
 * Backend values are numeric (0-8)
 * Used in: PropertyInformation.buildingType
 */
const BuildingType = Object.freeze({
  APARTMENT: 0,
  VILLA: 1,
  SWEET: 2,
  ROOM: 3,
  STUDIO: 4,
  OFFICE: 5,
  FARMS: 6,
  SHOP: 7,
  WAREHOUSE: 8,
});

const BuildingTypeLabels = Object.freeze({
  [BuildingType.APARTMENT]: 'شقة',
  [BuildingType.VILLA]: 'فيلا',
  [BuildingType.SWEET]: 'سويت',
  [BuildingType.ROOM]: 'غرفة',
  [BuildingType.STUDIO]: 'استوديو',
  [BuildingType.OFFICE]: 'مكتب',
  [BuildingType.FARMS]: 'مزرعة',
  [BuildingType.SHOP]: 'متجر',
  [BuildingType.WAREHOUSE]: 'مستودع',
});

const BuildingTypeKeys = Object.freeze({
  [BuildingType.APARTMENT]: 'apartment',
  [BuildingType.VILLA]: 'villa',
  [BuildingType.SWEET]: 'sweet',
  [BuildingType.ROOM]: 'room',
  [BuildingType.STUDIO]: 'studio',
  [BuildingType.OFFICE]: 'office',
  [BuildingType.FARMS]: 'farms',
  [BuildingType.SHOP]: 'shop',
  [BuildingType.WAREHOUSE]: 'warehouse',
});

const BuildingTypeByKey = Object.freeze({
  apartment: BuildingType.APARTMENT,
  villa: BuildingType.VILLA,
  sweet: BuildingType.SWEET,
  room: BuildingType.ROOM,
  studio: BuildingType.STUDIO,
  office: BuildingType.OFFICE,
  farms: BuildingType.FARMS,
  shop: BuildingType.SHOP,
  warehouse: BuildingType.WAREHOUSE,
});

export { BuildingType, BuildingTypeLabels, BuildingTypeKeys, BuildingTypeByKey };
