interface TelegramUser {
  id: number;
  first_name: string;
  last_name?: string;
  username?: string;
  language_code?: string;
}

declare global {
  interface Window {
    Telegram?: {
      WebApp: {
        initDataUnsafe: {
          user?: TelegramUser;
        };
        CloudStorage: {
          setItem(key: string, value: string, callback?: (err: Error | null) => void): void;
          getItem(key: string, callback: (err: Error | null, value?: string) => void): void;
        };
      };
    };
  }
}

export {};
