/**
 * Minimal FoundryVTT global type declarations for type-checking the module entry point.
 * The `Hooks` object is provided by FoundryVTT at runtime as a browser global.
 */

declare const Hooks: {
  once(event: string, fn: (...args: unknown[]) => void): void;
  on(event: string, fn: (...args: unknown[]) => void): void;
  off(event: string, fn: (...args: unknown[]) => void): void;
  call(event: string, ...args: unknown[]): boolean;
  callAll(event: string, ...args: unknown[]): boolean;
};

declare const ui: {
  notifications?: {
    info(msg: string): void;
    warn(msg: string): void;
    error(msg: string): void;
  };
};

declare const game: {
  user?: {
    getFlag?(scope: string, key: string): unknown;
    setFlag?(scope: string, key: string, value: unknown): Promise<void>;
  };
};
