import React, { Children, } from 'react';
import { NestedTableGhostIndentationCell } from './NestedTableGhostIndentationCell';
import { classes, st } from './NestedTableDragAndDropRow.st.css.js';
import { observer } from 'mobx-react-lite';
function _NestedTableDragAndDropRow(props) {
    const { children, item, forwardedRef } = props;
    const { type: Tr, key, props: trProps } = children;
    const { nestedTable } = item.state;
    const nestedTableDragAndDrop = nestedTable.nestedTableDragAndDrop;
    const { dragEventParentAndAfter } = nestedTableDragAndDrop;
    const node = dragEventParentAndAfter?.node;
    return (React.createElement(Tr, { key: key, ref: forwardedRef, ...trProps, className: st(classes.root, {
            draggingInto: node?.parent?.id === item.originalKeyedItem.id &&
                !node.node._expanded,
        }, trProps.className) },
        React.createElement(NestedTableGhostIndentationCell, { item: item }),
        Children.toArray(trProps.children)));
}
export const NestedTableDragAndDropRow = observer(_NestedTableDragAndDropRow);
//# sourceMappingURL=NestedTableDragAndDropRow.js.map