import { Configuration, JournalApi, PlanApi, TrackingApi, InboxApi } from "../dashclient";

const apiHost = import.meta.env.VITE_API_HOST;
const apiPort = import.meta.env.VITE_API_PORT;

console.log(`API Host: ${apiHost}`);
console.log(`API Port: ${apiPort}`);

const configuration = new Configuration({
  basePath: `http://${apiHost}:${apiPort}/api/v1`
});

export const journalApi = new JournalApi(configuration);
export const planApi = new PlanApi(configuration);
export const trackingApi = new TrackingApi(configuration);
export const inboxApi = new InboxApi(configuration);