import { GeoApiClient } from "../libs/geo-api-client/dist/index.js";

class BrowserStorage {
  getItem(key) {
    return localStorage.getItem(key);
  }
  setItem(key, value) {
    localStorage.setItem(key, value);
  }
  removeItem(key) {
    localStorage.removeItem(key);
  }
}

export function createApiClient(baseUrl) {
  return new GeoApiClient(baseUrl, new BrowserStorage());
}
