import { create } from 'zustand'

interface MatchCenterState {
  selectedPropertyId: string | null
  selectedNeedId: string | null
  setSelectedProperty: (id: string | null) => void
  setSelectedNeed: (id: string | null) => void
  clearSelection: () => void
}

export const useMatchCenterStore = create<MatchCenterState>((set) => ({
  selectedPropertyId: null,
  selectedNeedId: null,
  setSelectedProperty: (id) => set({ selectedPropertyId: id }),
  setSelectedNeed: (id) => set({ selectedNeedId: id }),
  clearSelection: () => set({ selectedPropertyId: null, selectedNeedId: null }),
}))
