import { create } from "zustand"; import { REPORTS, type MonitoringReport } from "./reportData"; type ReportStore = { reports: MonitoringReport[]; updateReport: (reportId: string, updates: Partial) => void; }; export const useReportStore = create()((set) => ({ reports: REPORTS, updateReport: (reportId, updates) => set((state) => ({ reports: state.reports.map((report) => report.reportId === reportId ? { ...report, ...updates } : report), })), }));