/**
 * Application-wide enumeration definitions
 *
 * This file contains centralized enum declarations for consistent
 * type-safe values across the application. Using enums instead of
 * magic numbers/strings improves code clarity, maintainability,
 * and prevents errors.
 */

/**
 * Boolean representation using numbers
 *
 * Standardized boolean values for database storage and API responses
 * where boolean types might not be available or consistent.
 *
 * @enum
 * @example BooleanEnum.FALSE // 0
 * @example BooleanEnum.TRUE  // 1
 */
export enum BooleanEnum {
  FALSE = 0,
  TRUE = 1,
}

/**
 * User type classifications
 *
 * Defines different categories of users within the system.
 * Useful for role-based access control and user-specific logic.
 *
 * @enum
 * @example USER_TYPES.CLIENT   // 'client'
 * @example USER_TYPES.TENANT   // 'tenant'
 */
export enum USER_TYPES {
  CLIENT = 'client', // Regular client user
  TENANT = 'tenant', // Tenant/renter user
  OWNER = 'owner', // Property owner
  VENDOR = 'vendor', // Service provider/vendor
  PROSPECT = 'prospect', // Prospective customer
}

/**
 * User address types
 *
 * Differentiates between primary and alternate addresses for users.
 * Useful for contact information management.
 *
 * @enum
 * @example USER_ADDRESS_TYPE_ENUM.PRIMARY    // 'primary'
 * @example USER_ADDRESS_TYPE_ENUM.ALTERNATE  // 'alternate'
 */
export enum USER_ADDRESS_TYPE_ENUM {
  PRIMARY = 'primary', // Main/primary address
  ALTERNATE = 'alternate', // Secondary/alternate address
}

/**
 * User role identifiers
 *
 * Numeric role identifiers for permission and access control.
 * Higher numbers typically indicate more permissions.
 *
 * @enum
 * @example USER_ROLES.RENTER  // 10
 * @example USER_ROLES.DEFAULT // 14
 */
export enum USER_ROLES {
  RENTER = 10, // Basic renter/tenant role
  DEFAULT = 14, // Default/standard user role
}

/**
 * Leasing term types
 *
 * Defines different leasing period structures for rental agreements.
 *
 * @enum
 * @example LeasingTerm.Fixed   // 'fixed'
 * @example LeasingTerm.Monthly // 'monthly'
 */
export enum LeasingTerm {
  Fixed = 'fixed', // Fixed-term lease (e.g., 12 months)
  Monthly = 'monthly', // Month-to-month lease
}

/**
 * Event type classifications
 *
 * Categorizes different types of events in the system for
 * calendar management, notifications, and activity tracking.
 *
 * @enum
 * @example EventTypeEnum.TASK     // 'task'
 * @example EventTypeEnum.MOVE_IN  // 'move_in'
 */
export enum EventTypeEnum {
  TASK = 'task', // General task/reminder
  MOVE_IN = 'move_in', // Tenant move-in event
  TENANT = 'tenant', // Tenant-related event
  NOTE = 'note', // General note/remark
}

/**
 * Status change actions
 *
 * Actions that can be performed on entity statuses (activate/deactivate).
 *
 * @enum
 * @example StatusAction.ACTIVATE   // 'activate'
 * @example StatusAction.DEACTIVATE // 'deactivate'
 */
export enum StatusAction {
  ACTIVATE = 'activate', // Activate/enable an entity
  DEACTIVATE = 'deactivate', // Deactivate/disable an entity
}

/**
 * Association type identifiers
 *
 * Numeric identifiers for different types of organizational associations.
 * Likely used in a multi-level affiliate/partner system.
 *
 * @enum
 * @example AssociationType.INSTITUTE    // 1
 * @example AssociationType.MASTER_AGENT // 2
 */
export enum AssociationType {
  INSTITUTE = 1, // Educational institute
  MASTER_AGENT = 2, // Master/primary agent
  SUB_AGENT = 3, // Subordinate agent
}

/**
 * User modification tracking
 *
 * Identifies which user field is being referenced in audit logs
 * or change tracking (created_by vs updated_by).
 *
 * @enum
 * @example ByUserType.CREATED_BY // 'created_by'
 * @example ByUserType.UPDATED_BY // 'updated_by'
 */
export enum ByUserType {
  CREATED_BY = 'created_by', // User who created the record
  UPDATED_BY = 'updated_by', // User who last updated the record
}

/**
 * Additional enum recommendations that could be useful:
 *
 * export enum PaymentStatus {
 *   PENDING = 'pending',
 *   COMPLETED = 'completed',
 *   FAILED = 'failed',
 *   REFUNDED = 'refunded',
 * }
 *
 * export enum DocumentType {
 *   PASSPORT = 'passport',
 *   VISA = 'visa',
 *   CONTRACT = 'contract',
 *   INVOICE = 'invoice',
 * }
 *
 * export enum NotificationChannel {
 *   EMAIL = 'email',
 *   SMS = 'sms',
 *   PUSH = 'push',
 *   IN_APP = 'in_app',
 * }
 *
 * export enum PriorityLevel {
 *   LOW = 1,
 *   MEDIUM = 2,
 *   HIGH = 3,
 *   CRITICAL = 4,
 * }
 */

/**
 * Best practices for enum usage:
 *
 * 1. Use string enums for API responses (self-documenting)
 * 2. Use numeric enums for database storage (space-efficient)
 * 3. Always reference enums instead of raw values
 * 4. Add comprehensive JSDoc comments for each enum value
 * 5. Consider i18n requirements for display values
 */
