export {};

declare global {
  interface Window {
    game_data: {
      group_id: number;
      player: {
        id: number;
        name: string;
      };
      village: {
        id: number;
        x: number;
        y: number;
      };
      market: string;
      locale: string;
      screen: string;
      mode: string | null;
      world: string;
      features: {
        Premium: {
          active: boolean;
        };
      };
    };
    TribalWars: {
      redirect: (queryParams: Record<string, string>) => void;
      buildURL: (
        method: string,
        screen: string,
        params: Record<string, string>
      ) => string;
    };
    UI: {
      InfoMessage: (s: string) => void;
      ErrorMessage: (s: string) => void;
    };
    Dialog: {
      show: (id: string, html: string) => void;
      close: () => void;
    };
    Timing: {
      getCurrentServerTime: () => number;
    };
  }
}
