/* tslint:disable */
/* eslint-disable */

/**
 * RGBA image of the grid, `tile` pixels per cell.
 */
export function wfc_image(): Uint8Array;

/**
 * [pixels per cell, number of patterns]
 */
export function wfc_info(): Uint32Array;

/**
 * Start a new grid of `w`×`h` cells with a tile set (0 pipes, 1 terrain, 2 maze, 3 lakes).
 * `wrap` makes the result tile seamlessly.
 */
export function wfc_new(kind: number, w: number, h: number, seed: number, wrap: boolean): void;

/**
 * The tile sheet or sample image of a tile set: [width, height] followed by RGBA bytes.
 */
export function wfc_preview(kind: number): Uint8Array;

/**
 * Decide up to `n` more cells. Returns [status (0 running, 1 done, 2 failed),
 * decided cells, backtracks, restarts].
 */
export function wfc_step(n: number): Uint32Array;

export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;

export interface InitOutput {
    readonly memory: WebAssembly.Memory;
    readonly wfc_image: () => [number, number];
    readonly wfc_info: () => [number, number];
    readonly wfc_new: (a: number, b: number, c: number, d: number, e: number) => [number, number];
    readonly wfc_preview: (a: number) => [number, number];
    readonly wfc_step: (a: number) => [number, number];
    readonly __wbindgen_externrefs: WebAssembly.Table;
    readonly __wbindgen_free: (a: number, b: number, c: number) => void;
    readonly __externref_table_dealloc: (a: number) => void;
    readonly __wbindgen_start: () => void;
}

export type SyncInitInput = BufferSource | WebAssembly.Module;

/**
 * Instantiates the given `module`, which can either be bytes or
 * a precompiled `WebAssembly.Module`.
 *
 * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
 *
 * @returns {InitOutput}
 */
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;

/**
 * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
 * for everything else, calls `WebAssembly.instantiate` directly.
 *
 * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
 *
 * @returns {Promise<InitOutput>}
 */
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
