const PLANS_ROUTE = '/plans';
const LEGACY_SIMPLE_ROUTE = '/simple';

export function getPlansRoute() {
  return PLANS_ROUTE;
}

export function getLegacySimpleRoute() {
  return LEGACY_SIMPLE_ROUTE;
}

export function buildPlanDrillInUrl(setupId: string) {
  return `${PLANS_ROUTE}?${new URLSearchParams({ setupId }).toString()}`;
}

export function buildCreateExitPlanUrl(symbol: string, tradeId?: string | null) {
  const params = new URLSearchParams({
    mode: 'sell',
    symbol,
  });
  if (tradeId) params.set('tradeId', tradeId);
  return `${PLANS_ROUTE}?${params.toString()}`;
}
