// Re-export from reusable lib (frontend/libs/frontend-api-client)
import { createApiClient, type ApiResponse, type ApiError } from '../../../libs/frontend-api-client'

export type { ApiResponse, ApiError }

function getApiKey(): string | null {
  if (typeof window !== 'undefined') {
    return localStorage.getItem('api_key')
  }
  return null
}

export const apiClient = createApiClient(
  undefined,
  getApiKey
)
