export type { ApiClient, ApiClientConfig } from './api/createApiClient'
export { ApiError, createApiClient, isAbortError } from './api/createApiClient'

export type {
  AuthUser,
  DashboardType,
  LoginResponse,
  MeResponse,
  OtpSendResponse,
  OtpVerifyResponse,
  RegisterResponse,
  UserProfile,
} from './types/auth'

export { toE164CellNumber, formatCellForDisplay } from './utils/cellNumber'
export {
  calcDiscountPercent,
  formatIrtInput,
  formatIrtPrice,
  hasStoreItemDiscount,
  parseIrtInput,
} from './utils/irtPrice'

export {
  formatDashboardDocumentTitle,
  normalizeRoutePath,
  resolveRoutePageLabels,
  type DashboardDocumentTitleParts,
  type RouteTitleRule,
} from './utils/documentTitle'

export { applyDocumentFavicon } from './utils/favicon'

export {
  applyDocumentLocale,
  DASHBOARD_LOCALE_STORAGE_KEY,
  getLocaleDirection,
  isDashboardLocale,
  readStoredLocale,
  writeStoredLocale,
  type DashboardLocale,
} from './locale/dashboardLocale'

export {
  BUSINESS_SUBDOMAIN_PREFIX,
  CUSTOMER_SUBDOMAIN_PREFIX,
  getBaseDomainFromHost,
  getBusinessDashboardHost,
  getCustomerDashboardHost,
  isBusinessDashboardHost,
  isCustomerDashboardHost,
  stripDashboardSubdomain,
} from './domain/subdomain'
