import { create } from 'zustand'

export const useSceneStore = create((set) => ({
  scrollProgress: 0,
  activeSection: 0, // 0: First Mile, 1: Mid Mile, 2: Last Mile, 3: Analytics
  truckProgress: 0,
  cameraTarget: [19.727, 4.397, -31.08], // Initial target, e.g. First Mile warehouse
  lenis: null,
  setScrollProgress: (progress) => set({ scrollProgress: progress }),
  setActiveSection: (section) => set({ activeSection: section }),
  setTruckProgress: (progress) => set({ truckProgress: progress }),
  setCameraTarget: (target) => set({ cameraTarget: target }),
  setLenis: (lenis) => set({ lenis }),
}))
