import { create } from 'zustand'

export interface Stats {
  viewers?: number
  cumulative?: number
  feedbackCount?: number
  shareCount?: number
  likeCount?: number
}

interface StatsState {
  stats: Stats
  setStats: (stats: Stats) => void
}

export const useStatsStore = create<StatsState>((set) => ({
  stats: {},
  setStats: (stats) => set((s) => ({ stats: { ...s.stats, ...stats } })),
}))
