/// <reference types="vite/client" />

declare module '*.module.css' {
  const classes: { readonly [key: string]: string };
  export default classes;
}

// Workaround: @types/three's exports map uses .js extensions that bundler resolution
// cannot resolve. Declare TrackballControls directly.
declare module 'three/examples/jsm/controls/TrackballControls' {
  import type { Camera, Vector3 } from 'three';
  export class TrackballControls {
    constructor(camera: Camera, domElement?: HTMLElement);
    object: Camera;
    domElement: HTMLElement;
    enabled: boolean;
    screen: { left: number; top: number; right: number; bottom: number };
    rotateSpeed: number;
    zoomSpeed: number;
    panSpeed: number;
    staticMoving: boolean;
    dynamicDampingFactor: number;
    minDistance: number;
    maxDistance: number;
    minZoom: number;
    maxZoom: number;
    noRotate: boolean;
    noZoom: boolean;
    noPan: boolean;
    noRoll: boolean;
    target: Vector3;
    update(deltaTime?: number): boolean;
    reset(): void;
    dispose(): void;
  }
}
