/**
 * SIM Domain - Contract
 * 
 * Constants and types for the SIM domain.
 * All validated types are derived from schemas (see schema.ts).
 */

// ============================================================================
// SIM Status Constants
// ============================================================================

export const SIM_STATUS = {
  ACTIVE: "active",
  SUSPENDED: "suspended",
  CANCELLED: "cancelled",
  PENDING: "pending",
} as const;

// ============================================================================
// SIM Type Constants
// ============================================================================

export const SIM_TYPE = {
  STANDARD: "standard",
  NANO: "nano",
  MICRO: "micro",
  ESIM: "esim",
} as const;

// ============================================================================
// SIM Plan Codes (frontend-safe subset; authoritative list lives in WHMCS)
// ============================================================================

export const SIM_PLAN_CODES = ["PASI_5G", "PASI_10G", "PASI_25G", "PASI_50G"] as const;

export type SimPlanCode = (typeof SIM_PLAN_CODES)[number];

export const SIM_PLAN_LABELS: Record<SimPlanCode, string> = {
  PASI_5G: "5GB",
  PASI_10G: "10GB",
  PASI_25G: "25GB",
  PASI_50G: "50GB",
};

// ============================================================================
// Re-export Types from Schema (Schema-First Approach)
// ============================================================================

export type {
  SimStatus,
  SimType,
  SimDetails,
  RecentDayUsage,
  SimUsage,
  SimTopUpHistoryEntry,
  SimTopUpHistory,
  // Request types
  SimTopUpRequest,
  SimPlanChangeRequest,
  SimCancelRequest,
  SimTopUpHistoryRequest,
  SimFeaturesUpdateRequest,
  // Activation types
  SimOrderActivationRequest,
  SimOrderActivationMnp,
  SimOrderActivationAddons,
} from './schema';
