import { useGameStore } from '@/stores/gameStore'
import { useZoneStore } from '@/stores/zoneStore'

export function useCameraControls(scene: Phaser.Scene) {
  const gameStore = useGameStore()
  const camera = scene.cameras.main

  const onPointerDown = () => gameStore.setPlayerDraggingCamera(true)
  const onPointerUp = () => gameStore.setPlayerDraggingCamera(false)

  scene.input.on(Phaser.Input.Events.POINTER_DOWN, onPointerDown)
  scene.input.on(Phaser.Input.Events.POINTER_UP, onPointerUp)

  return { camera }
}
