<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile
?>
<?php
/**
 * @var \Magento\Sales\Block\Adminhtml\Order\View\Items $block
 */
$_order = $block->getOrder() ?>
<div class="admin__table-wrapper">
    <table class="data-table admin__table-primary edit-order-table">
        <thead>
            <tr class="headings">
                <?php $i = 0;
                $columns = $block->getColumns();
                $lastItemNumber = count($columns) ?>
                <?php foreach ($columns as $columnName => $columnTitle):?>
                    <?php $i++; ?>
                    <th class="col-<?= /* @noEscape */ $columnName ?><?= /* @noEscape */ ($i === $lastItemNumber ? ' last' : '') ?>"><span><?= /* @noEscape */ $columnTitle ?></span></th>
                <?php endforeach; ?>
            </tr>
        </thead>
        <?php $_items = $block->getItemsCollection();?>
        <?php $i = 0; foreach ($_items as $_item):?>
            <?php if ($_item->getParentItem()) {
                continue;
            } else {
                $i++;
            }?>
            <tbody class="<?= /* @noEscape */ $i%2 ? 'even' : 'odd' ?>">
                <?= $block->getItemHtml($_item) ?>
                <?= $block->getItemExtraInfoHtml($_item) ?>
            </tbody>
        <?php endforeach; ?>
    </table>
</div>
