interface TelegramWebAppUser {
  id: number;
  first_name: string;
  last_name?: string;
  username?: string;
  language_code?: string;
  is_premium?: boolean;
  photo_url?: string;
}

interface TelegramWebAppInitData {
  query_id?: string;
  user?: TelegramWebAppUser;
  auth_date?: string;
  hash?: string;
  start_param?: string;
}

interface TelegramWebApp {
  initData: string;
  initDataUnsafe: TelegramWebAppInitData;
  openTelegramLink: (url: string) => void;
  openLink: (url: string, options?: any) => void;
  close: () => void;
  disableVerticalSwipes: () => void;
  enableVerticalSwipes: () => void;
  isVersionAtLeast: (version: string) => boolean;
  // Другие методы и свойства Telegram Web App API
}

interface Window {
  Telegram?: {
    WebApp?: TelegramWebApp;
  };
}
