/* eslint-disable fp/no-delete */
import { createContext } from "./react-immersive-history";
const initialGroupComponentsState = {
    componentsByLayouts: {},
    metadata: {
        row: { id: "none" },
        source: {
            rowId: null,
            type: "record",
            params: {},
            defaultRow: { type: "first-row" },
        },
        error: { name: "", message: "" },
        loading: false,
        revalidate: () => { },
    },
};
export const GroupComponentsContext = createContext(initialGroupComponentsState, (modify) => ({
    setComponentsByLayout(componentsByLayouts) {
        modify((draft) => {
            draft.componentsByLayouts = componentsByLayouts;
        });
    },
    setMetadata(metadata) {
        modify((draft) => {
            draft.metadata = metadata;
        });
    },
}));
export default GroupComponentsContext;
//# sourceMappingURL=GroupComponentsContext.js.map