export const URL_CONSTANTS = {
  AUTH: {
    LOGIN: "/api/auth/login",
    REGISTER: "/api/auth/register",
    REFRESH_TOKEN: "/api/auth/refresh-token",
    LOGOUT: "/api/auth/logout",
    PROFILE: "/auth/profile",
  },

  USERS: {
    BASE: "/users",
    BY_ID: (id: string | number) => `/users/${id}`,
    SIGN_UP: "/api/auth/signup-with-pwd",
    SET_PASSWORD: "/api/auth/set-password",
    ME: "/api/auth/me",
    GENERATE_VERIFICATION_CODE: "/users/generate-verification-code",
  },

  OTP: {
    SEND: "/api/otp/send",
    VERIFY: "/api/otp/verify",
  },
  ROLES: {
    BASE: "/roles",
    BY_ID: (id: string | number) => `/roles/${id}`,
  },

  PERMISSIONS: {
    BASE: "/permissions",
    BY_ID: (id: string | number) => `/permissions/${id}`,
  },

  PRODUCTS: {
    BASE: "/products",
    BY_ID: (id: string | number) => `/products/${id}`,
  },

  ORDERS: {
    BASE: "/orders",
    BY_ID: (id: string | number) => `/orders/${id}`,
  },

  FILES: {
    BASE: "/files",
    UPLOAD: "/files/upload",
    FILE_UPLOAD_SETTINGS: "/files/upload",
    FILE_UPLOAD_SETTINGS_BY_CODE: "/api/file-upload-settings/by-code",
    DOWNLOAD: (id: string | number) => `/files/${id}/download`,
    DELETE: (id: string | number) => `/files/${id}`,
    BY_ID: (id: string | number) => `/files/${id}`,
  },

  SETTINGS: {
    BASE: "/settings",
    GENERAL: "/settings/general",
    SECURITY: "/settings/security",
    NOTIFICATIONS: "/settings/notifications",
  },

  DROPDOWN_SETTINGS: {
    BASE: "/api/dropdown-settings",
    BY_ID: (id: string) => `/api/dropdown-settings/${id}`,
    BY_CODE: (code: string) =>
      `/api/dropdown-settings/by-code/${encodeURIComponent(code)}`,
    OPTIONS: (id: string) => `/api/dropdown-settings/${id}/options`,
    OPTION_BY_ID: (optionId: string) =>
      `/api/dropdown-settings/options/${optionId}`,
  },

  CUSTOMERS: {
    BASE: "/customers",
    BY_ID: (id: string | number) => `/customers/${id}`,
    BOOKINGS: (id: string | number) => `/customers/${id}/bookings`,
  },

  CUSTOMERS_API: {
    BASE: "/api/customers",
    BY_ID: (id: string) => `/api/customers/${id}`,
    BY_USER_ID: (id: string) => `/api/customers/user/${id}`,
  },

  COMPANIES_API: {
    GET_INFO: "/api/companies/getInfo",
    CREATE: "/api/companies/create",
    PROFILE: "/api/companies/profile",
    COMPANY_PROFILES: "/api/companies/company-profiles",
    COMPANY_PROFILE: "/api/companies/company-profile",
    ACTIVE_MODE: "/api/companies/active-mode",
    ONBOARDING_START: "/api/companies/onboarding/start",
    ONBOARDING_STEP: "/api/companies/onboarding-step",
    ONBOARDING_COMPLETE: "/api/companies/onboarding/complete",
    DASHBOARD: "/api/companies/dashboard",
    FETCH_ETRADE_INFO: "/api/companies/fetch-etrade-info",
    DOCUMENTS: (id: string) => `/api/companies/${id}/documents`,
    PROFILE_LICENSE: (profileId: string) =>
      `/api/companies/company-profiles/${profileId}/license`,
  },

  BOOKINGS: {
    BASE: "/bookings",
    BY_ID: (id: string | number) => `/api/bookings/${id}`,
    CONTRACT_VIEW: (id: string) => `/api/bookings/${id}/contract/view`,
    CONTRACT_DOCUMENT: (id: string) => `/api/bookings/${id}/contract/document`,
    CONTRACT_SIGN: (id: string) => `/api/bookings/${id}/contract/sign`,
    CONTRACT_DOWNLOAD: (id: string) => `/api/bookings/${id}/contract`,
    CANCEL: (id: string | number) => `/api/bookings/${id}/cancel`,
    CONFIRM: (id: string | number) => `/api/bookings/${id}/confirm`,
  },

  TRAIN_SCHEDULING: {
    BOOKABLE_SCHEDULES: "/api/train-scheduling/bookable-schedules",
    AVAILABLE_DAYS: "/api/train-scheduling/available-days",
  },

  PAYMENTS: {
    INITIATE: "/api/payments/initiate",
    INTENT: (bookingId: string) => `/api/payments/intents/${bookingId}`,
    CHECKOUT: "/api/payments/checkout",
  },
};
