import * as Solid from 'solid-js';
// Solid 2's `useContext` throws for a default-less context with no mounted
// provider, so default to `null` to keep the unset read falsy instead.
export const nonRouteComponentContext = process.env.NODE_ENV !== 'production'
    ? /* @__PURE__ */ Solid.createContext(null)
    : undefined;
export function renderInNonRouteComponentContext(render, component) {
    // In Solid 2 the context object itself is the provider component.
    const Context = nonRouteComponentContext;
    return <Context value={component}>{render()}</Context>;
}
//# sourceMappingURL=nonRouteComponentContext.jsx.map