import { jsx } from "react/jsx-runtime";
import { createContext, useContext, useMemo } from "react";
const DEFAULT_OPTIONS = {
    readOnly: false,
    enableMediaEmbedding: false
};
const StickyNoteCanvasOptionsContext = /*#__PURE__*/ createContext(DEFAULT_OPTIONS);
function StickyNoteCanvasOptionsProvider({ options, children }) {
    const value = useMemo(()=>({
            readOnly: options?.readOnly ?? DEFAULT_OPTIONS.readOnly,
            enableMediaEmbedding: options?.enableMediaEmbedding ?? DEFAULT_OPTIONS.enableMediaEmbedding
        }), [
        options?.enableMediaEmbedding,
        options?.readOnly
    ]);
    return /*#__PURE__*/ jsx(StickyNoteCanvasOptionsContext.Provider, {
        value: value,
        children: children
    });
}
function useStickyNoteCanvasOptions() {
    return useContext(StickyNoteCanvasOptionsContext);
}
export { StickyNoteCanvasOptionsProvider, useStickyNoteCanvasOptions };
