/**
 * Centralized route configuration for the Amba Pay app
 * This file contains all route paths as constants to avoid hardcoded strings
 * and make route management easier across the application.
 */

export const ROUTES = {
  // Main app routes
  HOME: "/",
  SIGNIN: "/auth/signin",
  PHONE_SETUP: "/auth/phone-setup",
  GOOGLE_SETUP: "/auth/google-setup",
  OTP: "/auth/otp",
  AGENT_SIGNUP: "/auth/agent-signup",
  AGENT_SIGNIN: "/auth/agent-signin",

  // Profile and account routes
  PROFILE: "/profile",
  EDIT_PROFILE: "/editprofile",
  CHANGE_PIN: "/changepin",
  HELP_SUPPORT: "/helpsupport",
  TERMS: "/terms",
  KYC: "/kyc",
  FORGOT_PASSWORD: "/auth/forgot",
  NOTIFICATION: "/notification",
  NOTIFICATION_OPTION: "/notificationOption",

  // Transaction routes
  SEND_OR_REQUEST_MONEY: "/sendorrequestmoney",
  CASH_OUT: "/cashout",
  SEND_BANK: "/sendbank",
  ADD_CARD: "/addcard",
  ADD_CASH: "/addcash",
  CHECKOUT: "/checkout",
  DONATION: "/donation",
  SELECT_ACCOUNT: "/selectacc",
  HISTORY: "/history",
  TRANSACTION_DETAIL: "/transdetail",
  TRANSACTION_CONFIRM: "/transconfirm",
  CARD_ADDED: "/cardaddedcomp",

  // Recipient routes
  ADD_RECIPIENT: "/addrecipient",
  LIST_RECIPIENTS: "/listrecipient",
  SELECT_RECIPIENT: "/selectrecip",
  RECIPIENT_DETAIL: "/recipdetail",
  SELECT_DONOR: "/selectdonor",
  RECIPIENT_ADDED: "/recipaddedcomp",

  // Other features
  CROWDFUNDING: "/crowdfunding",
  TASK_COMPLETION: "/taskcomp",
  CASHOUT_COMPLETION: "/cashoutcomp",
  ADDCASH_COMPLETION: "/addcashcomp",
  MONEY_REQUESTED: "/moneyrequested",
  MONEY_DONATED: "/moneydonated",
  REQUEST_PROVIDER: "/requestprovider",
  SCHEDULES: "/schedules",
  SCHEDULES_ALL: "/schedulesall",
  SEND_NOTIFICATION: "/sendnotification",

  EVENTS: "/events",

  EVENT_DETAIL: "/eventdetail",

  MY_TICKETS: "/mytickets",

  EVENT_QR: "/eventqrscreen",

  // QR
  QR_SCREEN: "/qrscreen",
  SCAN_PROFILE_QR: "/scanprofileqr",

  POINTS: "/points",
  POINTS_ACTIVITY: "/pointsactivity",

  LIST_CARD: "/cardmang",
} as const;

// Type for route values
export type RouteValue = (typeof ROUTES)[keyof typeof ROUTES];

// Helper function to check if a route is valid
export const isValidRoute = (route: string): route is RouteValue => {
  return Object.values(ROUTES).includes(route as RouteValue);
};

// Export individual routes for easier imports
export const {
  HOME,
  SIGNIN,
  PHONE_SETUP,
  GOOGLE_SETUP,
  OTP,
  PROFILE,
  EDIT_PROFILE,
  CHANGE_PIN,
  HELP_SUPPORT,
  TERMS,
  KYC,
  FORGOT_PASSWORD,
  NOTIFICATION,
  NOTIFICATION_OPTION,
  SEND_OR_REQUEST_MONEY,
  CASH_OUT,
  SEND_BANK,
  ADD_CARD,
  ADD_CASH,
  CHECKOUT,
  HISTORY,
  TRANSACTION_DETAIL,
  TRANSACTION_CONFIRM,
  CARD_ADDED,
  DONATION,
  ADD_RECIPIENT,
  LIST_RECIPIENTS,
  SELECT_RECIPIENT,
  RECIPIENT_DETAIL,
  SELECT_DONOR,
  RECIPIENT_ADDED,
  CROWDFUNDING,
  TASK_COMPLETION,
  CASHOUT_COMPLETION,
  ADDCASH_COMPLETION,
  MONEY_REQUESTED,
  MONEY_DONATED,
  REQUEST_PROVIDER,
  SCHEDULES,
  SCHEDULES_ALL,
  SEND_NOTIFICATION,
  EVENTS,
  EVENT_DETAIL,
  MY_TICKETS,
  EVENT_QR,
  POINTS,
  POINTS_ACTIVITY,
  QR_SCREEN,
  SCAN_PROFILE_QR,
} = ROUTES;
