/**
 * Type definitions for grid-related types
 */

import type { Unit } from "../units/Unit.js";

/**
 * Grid size
 */
export interface GridSize {
  x: number;
  y: number;
  z: number;
}

/**
 * Position coordinate
 */
export interface Position {
  x: number;
  y: number;
  z: number;
}

/**
 * Voxel ID (0 = air, 1+ = solid)
 */
export type VoxelId = number;

/**
 * Hazard data
 */
export interface Hazard {
  id: string;
  duration: number;
}

/**
 * Voxel data for queries
 */
export interface VoxelData extends Position {
  id: VoxelId;
}

/**
 * Move unit options
 */
export interface MoveUnitOptions {
  force?: boolean;
  [key: string]: unknown;
}

/**
 * Generated assets from world generators
 */
export interface GeneratedAssets {
  textures?: {
    floor?: HTMLCanvasElement | OffscreenCanvas | TextureAsset;
    wall?: HTMLCanvasElement | OffscreenCanvas | TextureAsset;
    [key: string]: HTMLCanvasElement | OffscreenCanvas | TextureAsset | undefined;
  };
  palette?: Record<string, HTMLCanvasElement | OffscreenCanvas | TextureAsset>;
  spawnZones?: {
    player?: Position[];
    enemy?: Position[];
  };
  [key: string]: unknown;
}

/**
 * Texture asset (composite with multiple maps)
 */
export interface TextureAsset {
  diffuse?: HTMLCanvasElement | OffscreenCanvas;
  emissive?: HTMLCanvasElement | OffscreenCanvas;
  normal?: HTMLCanvasElement | OffscreenCanvas;
  roughness?: HTMLCanvasElement | OffscreenCanvas;
  bump?: HTMLCanvasElement | OffscreenCanvas;
}

