declare global {
  interface Window {
    __AUNAR_CONFIG__?: {
      apiBaseUrl?: string;
    };
  }
}

const rawBase =
  (typeof window !== 'undefined' && window.__AUNAR_CONFIG__?.apiBaseUrl) ||
  '/api';

export const API_BASE_URL = rawBase.replace(/\/+$/, '');
