import { jsx as _jsx } from "@emotion/react/jsx-runtime";
import { createContext, useMemo } from 'react';
export const WidgetFieldContext = createContext({ path: [], data: {} });
export const WidgetFieldProvider = ({ path, data, children }) => {
    const context = useMemo(() => ({
        path,
        data: Object.assign({}, data),
    }), [path, data]);
    return (_jsx(WidgetFieldContext.Provider, { value: context, children: children }));
};
