import * as React from 'react';
import { BlockIdContext } from "../context/blockIdContext/index.js";
import usePCEditorBlockMouseEvents from "./usePCEditorBlockMouseEvents.js";
import usePCEditorBlockSelection from "./usePCEditorBlockSelection.js";
export function usePCEditorItemWrap(index = 0) {
    const [element, setElement] = React.useState();
    const blockRef = React.useCallback((node) => {
        if (node !== null) {
            setElement(node);
        }
    }, []);
    const parentBlockId = React.useContext(BlockIdContext);
    const adminBlockMouseEvents = usePCEditorBlockMouseEvents([...parentBlockId, index], element);
    usePCEditorBlockSelection([...parentBlockId, index], element);
    return { adminBlockMouseEvents, blockRef };
}
//# sourceMappingURL=usePCEditorItemWrap.js.map
