/**
 * Public contracts for the `@ump/shared/video-viewer` package — a VTK-free 2×2
 * video dataset quad-viewer. Kept deliberately free of any VTK / three.js types
 * so this subpath never pulls the heavy rendering chunk.
 */

export interface VideoSource {
  url?: string;
  file?: File;
  fps?: number;
  label?: string;
}

export interface DepthSource {
  url?: string;
  file?: File;
  label?: string;
}

export interface SegmentationSource {
  url?: string;
  file?: File;
  color?: string;
  opacity?: number;
  label?: string;
}

export interface ReconSource {
  ready?: boolean;
  placeholderText?: string;
}

export type QuadIndex = 0 | 1 | 2 | 3;
export type ExpandedView = QuadIndex | null;

export interface VideoQuadViewerProps {
  video?: VideoSource;
  depth?: DepthSource;
  segmentation?: SegmentationSource;
  recon?: ReconSource;
  className?: string;
  initialExpanded?: ExpandedView;
}

/**
 * One channel of a 2D image SEQUENCE (PNG frames). Either pre-resolved `urls` or
 * raw `files` (sorted naturally + turned into object URLs by the viewer). `opacity`
 * applies to the segmentation overlay in the fused (Phủ phân vùng) pane.
 */
export interface ImageSequenceSource {
  urls?: string[];
  files?: File[];
  color?: string;
  opacity?: number;
  label?: string;
}

export interface ImageSequenceViewerProps {
  original?: ImageSequenceSource;
  depth?: ImageSequenceSource;
  segmentation?: ImageSequenceSource;
  fps?: number;
  className?: string;
  initialExpanded?: ExpandedView;
}
