export function buildMessengerBotStartUrl(baseUrl: string, startToken: string) {
  const normalizedToken = startToken.trim();
  if (!baseUrl || !normalizedToken) {
    return '';
  }

  const payload = encodeURIComponent(normalizedToken);
  const separator = baseUrl.includes('?') ? '&' : '?';
  return `${baseUrl}${separator}start=${payload}`;
}
