<?php
/**
 * @var \FiloBlu\Rma\Block\Email\Items $block;
 */
?>

<table class="email-items rma-items">
    <thead>
    <tr>
        <th><?= /* @escapeNotVerified */  __('Product') ?></th>
        <th><?= /* @escapeNotVerified */  __('SKU') ?></th>
        <th><?= /* @escapeNotVerified */  __('Condition') ?></th>
        <th><?= /* @escapeNotVerified */  __('Resolution') ?></th>
        <th><?= /* @escapeNotVerified */  __('Requested Qty') ?></th>
        <th><?= /* @escapeNotVerified */  __('Qty') ?></th>
        <th><?= /* @escapeNotVerified */  __('Status') ?></th>
    </tr>
    </thead>
    <tbody>

    <?php if($collection = $block->getCollection()){
        foreach ($collection as $item): ?>
            <tr>
                <td>
                    <strong><?= $block->escapeHtml($item->getProductName()) ?></strong>
                    <?php if ($_options = $item->getOptions()): ?>
                        <dl class="item-options">
                            <?php foreach ($_options as $_option) : ?>
                                <dt><?= $block->escapeHtml($_option['label']) ?></dt>
                                <dd><?= $block->escapeHtml($_option['value']) ?></dd>
                            <?php endforeach; ?>
                        </dl>
                    <?php endif; ?>
                </td>
                <td><?= $block->escapeHtml($item->getProductSku()) ?></td>
                <td><?= $block->escapeHtml($block->getOptionAttributeStringValue($item->getCondition())) ?></td>
                <td><?=
                    $block->escapeHtml($block->getOptionAttributeStringValue($item->getResolution()));
                    $newSize = $block->getChangeSizeItems($item);
                    echo "<br/><dt>".$block->escapeHtml($newSize['label'])."</dt><dd>".$block->escapeHtml($newSize['value'])."</dd>";
                    ?></td>
                <td><?= /* @escapeNotVerified */  $this->helper('Magento\Rma\Helper\Data')->parseQuantity($item->getQtyRequested(), $item) ?></td>
                <td><?= /* @escapeNotVerified */  $this->helper('Magento\Rma\Helper\Data')->getQty($item) ?></td>
                <td><?= $block->escapeHtml($item->getStatusLabel()) ?></td>
            </tr>
        <?php endforeach; }?>
    </tbody>
</table>


