import { jsxDEV as _jsxDEV } from "react/jsx-dev-runtime";
import { createContext, use } from 'react';
/**
     * @deprecated
     * The `docID` property is deprecated and will be removed in the next major version of Payload.
     * Use `doc.id` instead.
     */ /**
   * When called, will either refresh the list view with its currently selected collection.
   * If an collection slug is provided, will use that instead of the currently selected one.
   */ export const ListDrawerContext = /*#__PURE__*/ createContext({});
export const ListDrawerContextProvider = ({ children, ...rest })=>{
    return /*#__PURE__*/ _jsxDEV(ListDrawerContext, {
        value: {
            isInDrawer: Boolean(rest.drawerSlug),
            ...rest
        },
        children: children
    }, void 0, false, {
        fileName: "src/elements/ListDrawer/Provider.tsx",
        lineNumber: 49,
        columnNumber: 5
    }, this);
};
export const useListDrawerContext = ()=>{
    const context = use(ListDrawerContext);
    if (!context) {
        throw new Error('useListDrawerContext must be used within a ListDrawerContextProvider');
    }
    return context;
};

//# sourceMappingURL=Provider.js.map