import { createTradingKillSwitchClient, createTradingWebTelemetry } from '../../../shared/platform-web.js';

// Read Vite env vars via import.meta.env (not process.env — Vite does not inject those in the browser bundle)
export const tradingRuntime = {
  productId: (import.meta.env.VITE_PRODUCT_ID as string) || 'invttrdg',
  platformApiUrl: (import.meta.env.VITE_PLATFORM_URL as string) || 'https://api.bytelyst.com/platform/api',
  tradingApiUrl: (import.meta.env.VITE_TRADING_API_URL as string) || 'https://api.bytelyst.com/invttrdg',
};

export const tradingKillSwitchClient = createTradingKillSwitchClient('web');
export const tradingTelemetry = createTradingWebTelemetry();
