#!/usr/bin/env bash
# Thin dispatcher for VHS tape recordings.
# Maps short names to demo scripts so tape commands stay readable.
set -euo pipefail

cmd="${1:?Usage: painted-demo <name> [flags]}"
shift

case "$cmd" in
  # patterns
  rendering)   exec uv run python demos/patterns/rendering.py "$@" ;;
  hit-testing) exec uv run python demos/patterns/hit_testing.py "$@" ;;
  fidelity)    exec uv run python demos/patterns/fidelity.py "$@" ;;
  responsive)  exec uv run python demos/patterns/responsive.py "$@" ;;
  live)        exec uv run python demos/patterns/live.py "$@" ;;
  focus)       exec uv run python demos/patterns/focus.py "$@" ;;
  profiler)    exec uv run python demos/patterns/profiler.py "$@" ;;
  # primitives
  show)        exec uv run python demos/primitives/show.py "$@" ;;
  # apps
  minimal)     exec uv run python demos/apps/minimal.py "$@" ;;
  widgets)     exec uv run python demos/apps/widgets.py "$@" ;;
  big-text)    exec uv run python demos/apps/big_text.py "$@" ;;
  tour)        exec uv run python demos/tour.py "$@" ;;
  *)           echo "Unknown demo: $cmd"; echo "Available: rendering hit-testing fidelity live focus profiler minimal widgets big-text tour"; exit 1 ;;
esac
