import { create } from 'zustand'

interface NewsReadState {
  readIds: Set<string>
  markRead: (newsId: string) => void
}

export const useNewsReadStore = create<NewsReadState>((set) => ({
  readIds: new Set(),
  markRead: (newsId) =>
    set((s) => ({ readIds: new Set([...s.readIds, newsId]) })),
}))
