import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import pick from "lodash/pick.js";
import BlockBase from "../../../../components/BlockBase/BlockBase.js";
import { BlockDecoration } from "../../../../customization/BlockDecoration.js";
import { usePCEditorItemWrap } from "../../../../hooks/usePCEditorItemWrap.js";
import { block } from "../../../../utils/index.js";
import './ConstructorBlock.css';
const b = block('constructor-block');
export const ConstructorBlock = ({ index = 0, data, children, }) => {
    const { blockRef, adminBlockMouseEvents } = usePCEditorItemWrap(index);
    const { type } = data;
    const blockBaseProps = React.useMemo(() => pick(data, ['anchor', 'visible', 'resetPaddings', 'indent']), [data]);
    return (_jsx("div", { ref: blockRef, ...adminBlockMouseEvents, children: _jsx(BlockDecoration, { type: type, index: index, ...blockBaseProps, children: _jsx(BlockBase, { className: b({ type }), ...blockBaseProps, children: children }) }) }));
};
//# sourceMappingURL=ConstructorBlock.js.map
