import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import { createContext, use } from 'react';
/* only available if `redirectAfterDuplicate` is `false` */ /**
     * If you want to pass additional data to the onSuccess callback, you can use this context object.
     *
     * @experimental This property is experimental and may change in the future. Use at your own risk.
     */ export const DocumentDrawerCallbacksContext = /*#__PURE__*/ createContext({});
export const DocumentDrawerContextProvider = ({ children, ...rest })=>{
    return /*#__PURE__*/ _jsxDEV(DocumentDrawerCallbacksContext, {
        value: {
            ...rest
        },
        children: children
    }, void 0, false, {
        fileName: "src/elements/DocumentDrawer/Provider.tsx",
        lineNumber: 45,
        columnNumber: 5
    }, this);
};
export const useDocumentDrawerContext = ()=>{
    const context = use(DocumentDrawerCallbacksContext);
    if (!context) {
        throw new Error('useDocumentDrawerContext must be used within a DocumentDrawerProvider');
    }
    return context;
};

//# sourceMappingURL=Provider.js.map