const API_VERSION = '/api/v1';

export const API_ENDPOINTS = {
  AUTH: {
    LOGIN: `${API_VERSION}/auth/login`,
    REGISTER: `${API_VERSION}/auth/register`,
    LOGOUT: `${API_VERSION}/auth/logout`,
    REFRESH: `${API_VERSION}/auth/refresh`,
    ME: `${API_VERSION}/auth/me`,
    FORGOT_PASSWORD: `${API_VERSION}/auth/forgot-password`,
    RESET_PASSWORD: `${API_VERSION}/auth/reset-password`,
  },
  USERS: {
    BASE: `${API_VERSION}/users`,
    BY_ID: (id: string) => `${API_VERSION}/users/${id}`,
    ROLES: (id: string) => `${API_VERSION}/users/${id}/roles`,
    CHANGE_PASSWORD: (id: string) => `${API_VERSION}/users/${id}/change-password`,
  },
  COMPANIES: {
    BASE: `${API_VERSION}/companies`,
    BY_ID: (id: string) => `${API_VERSION}/companies/${id}`,
    CONFIG: (id: string) => `${API_VERSION}/companies/${id}/config`,
  },
  PARTNERS: {
    BASE: `${API_VERSION}/partners`,
    BY_ID: (id: string) => `${API_VERSION}/partners/${id}`,
    CONTACTS: (id: string) => `${API_VERSION}/partners/${id}/contacts`,
    ADDRESSES: (id: string) => `${API_VERSION}/partners/${id}/addresses`,
  },
  CORE: {
    COUNTRIES: `${API_VERSION}/core/countries`,
    STATES: `${API_VERSION}/core/states`,
    CURRENCIES: `${API_VERSION}/core/currencies`,
    EXCHANGE_RATES: `${API_VERSION}/core/exchange-rates`,
    UOMS: `${API_VERSION}/core/uoms`,
    UOM_CATEGORIES: `${API_VERSION}/core/uom-categories`,
    PAYMENT_TERMS: `${API_VERSION}/core/payment-terms`,
    SEQUENCES: `${API_VERSION}/core/sequences`,
  },
  INVENTORY: {
    PRODUCTS: `${API_VERSION}/inventory/products`,
    CATEGORIES: `${API_VERSION}/inventory/categories`,
    WAREHOUSES: `${API_VERSION}/inventory/warehouses`,
    LOCATIONS: `${API_VERSION}/inventory/locations`,
    STOCK_MOVES: `${API_VERSION}/inventory/stock-moves`,
    PICKINGS: `${API_VERSION}/inventory/pickings`,
    LOTS: `${API_VERSION}/inventory/lots`,
    ADJUSTMENTS: `${API_VERSION}/inventory/adjustments`,
  },
  SALES: {
    QUOTATIONS: `${API_VERSION}/sales/quotations`,
    ORDERS: `${API_VERSION}/sales/orders`,
    PRICELISTS: `${API_VERSION}/sales/pricelists`,
  },
  PURCHASES: {
    RFQS: `${API_VERSION}/purchases/rfqs`,
    ORDERS: `${API_VERSION}/purchases/orders`,
  },
  FINANCIAL: {
    ACCOUNTS: `${API_VERSION}/financial/accounts`,
    JOURNALS: `${API_VERSION}/financial/journals`,
    MOVES: `${API_VERSION}/financial/moves`,
    INVOICES: `${API_VERSION}/financial/invoices`,
    PAYMENTS: `${API_VERSION}/financial/payments`,
    TAXES: `${API_VERSION}/financial/taxes`,
  },
  PROJECTS: {
    PROJECTS: `${API_VERSION}/projects`,
    TASKS: `${API_VERSION}/projects/tasks`,
    STAGES: `${API_VERSION}/projects/stages`,
    MILESTONES: `${API_VERSION}/projects/milestones`,
    TIMESHEETS: `${API_VERSION}/projects/timesheets`,
  },
  CRM: {
    LEADS: `${API_VERSION}/crm/leads`,
    OPPORTUNITIES: `${API_VERSION}/crm/opportunities`,
    PIPELINE: `${API_VERSION}/crm/pipeline`,
    STAGES: `${API_VERSION}/crm/stages`,
  },
  HR: {
    EMPLOYEES: `${API_VERSION}/hr/employees`,
    DEPARTMENTS: `${API_VERSION}/hr/departments`,
    POSITIONS: `${API_VERSION}/hr/positions`,
    CONTRACTS: `${API_VERSION}/hr/contracts`,
    LEAVES: `${API_VERSION}/hr/leaves`,
    LEAVE_TYPES: `${API_VERSION}/hr/leave-types`,
  },
  SYSTEM: {
    MESSAGES: `${API_VERSION}/system/messages`,
    NOTIFICATIONS: `${API_VERSION}/system/notifications`,
    ACTIVITIES: `${API_VERSION}/system/activities`,
    FOLLOWERS: `${API_VERSION}/system/followers`,
  },
} as const;
