'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { createContext, useContext } from 'react';
export * from '../portal/index.js';
export const OpenMeterContext = createContext(null);
export function OpenMeterProvider({ children, value }) {
    return (_jsx(OpenMeterContext.Provider, { value: value, children: children }));
}
export function useOpenMeter() {
    const context = useContext(OpenMeterContext);
    if (typeof context === 'undefined') {
        throw new Error('useOpenMeter must be used within a OpenMeterProvider');
    }
    return context;
}
//# sourceMappingURL=context.js.map