// store/idiReportStore.js
import { create } from "zustand";

export const useIdiReportStore = create((set) => ({
  reportResponse: null,
  setReportResponse: (data) => set({ reportResponse: data }),
}));

// Expose on window so a tab opened via window.open() can read this
// tab's store directly through window.opener (no localStorage needed).
if (typeof window !== "undefined") {
  window.useIdiReportStore = useIdiReportStore;
}