"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.usePCEditorChildrenItemWrap = usePCEditorChildrenItemWrap;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const blockIdContext_1 = require("../context/blockIdContext/index.js");
const usePCEditorBlockRegister_1 = require("./usePCEditorBlockRegister.js");
function usePCEditorChildrenItemWrap(index = 0) {
    const parentBlockId = React.useContext(blockIdContext_1.BlockIdContext);
    const path = React.useMemo(() => [...parentBlockId, index], [parentBlockId, index]);
    const blockRef = (0, usePCEditorBlockRegister_1.usePCEditorBlockRegister)(path);
    return { blockRef, path };
}
//# sourceMappingURL=usePCEditorChildrenItemWrap.js.map
