import axios from "axios";

const managerApi = axios.create({
  baseURL: process.env.NEXT_PUBLIC_MANAGER_API,
  headers: {
    company: process.env.NEXT_PUBLIC_COMPANY_ID,
    product: process.env.NEXT_PUBLIC_PRODUCT_ID,
  },
});

const customerApi = axios.create({
  baseURL: process.env.NEXT_PUBLIC_CUSTOMER_API,
  headers: {
    company: process.env.NEXT_PUBLIC_COMPANY_ID,
    product: process.env.NEXT_PUBLIC_PRODUCT_ID,
  },
});

const authApi = axios.create({
  baseURL: process.env.NEXT_PUBLIC_AUTH_API,
  headers: {
    company_id: process.env.NEXT_PUBLIC_COMPANY_ID,
    product_id: process.env.NEXT_PUBLIC_PRODUCT_ID,
  },
});

const carCatalogApi = axios.create({
  baseURL: process.env.NEXT_PUBLIC_CAR_CATALOG_API,
  headers: {
    company: process.env.NEXT_PUBLIC_COMPANY_ID,
    product: process.env.NEXT_PUBLIC_PRODUCT_ID,
  },
});

export { managerApi, customerApi, authApi, carCatalogApi };
