/**
 * API client configuration
 */

export interface ApiConfig {
  baseUrl: string;
  timeoutMs: number;
  retries: number;
}

export const DEFAULT_API_CONFIG: ApiConfig = {
  baseUrl: 'http://localhost:8080',
  timeoutMs: 10_000,
  retries: 1,
};

export const API_PATHS = {
  auth: {
    login: '/api/auth/login',
    logout: '/api/auth/logout',
    refresh: '/api/auth/refresh',
  },
  users: {
    base: '/api/users',
    byId: (id: string) => `/api/users/${id}`,
    lock: (id: string) => `/api/users/${id}/lock`,
    unlock: (id: string) => `/api/users/${id}/unlock`,
    roles: (id: string) => `/api/users/${id}/roles`,
    password: (id: string) => `/api/users/${id}/password`,
  },
  roles: {
    base: '/api/roles',
  },
} as const;
