<?php
/**
 * Maho
 *
 * @category    design
 * @package     default_default
 * @copyright   Copyright (c) 2006-2020 Magento, Inc. (https://magento.com)
 * @copyright   Copyright (c) 2021-2022 The OpenMage Contributors (https://openmage.org)
 * @copyright   Copyright (c) 2024 Maho (https://mahocommerce.com)
 * @license     https://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
?>
<span class="field-row grid" id="shipment_tracking_info">
<?php if($this->getTrackingInfo()): ?>
    <?php if ($this->getTrackingInfo()->getErrorMessage()): ?>
        <?= $this->getTrackingInfo()->getErrorMessage() ?>
    <?php else: ?>
        <?php if ($this->getTrackingInfo()->getUrl()): ?>
            Please, visit for more info: <a href="<?= $this->getTrackingInfo()->getUrl() ?>" target="_blank"><?= $this->escapeHtml($this->trackingInfo->getCarrierTitle()) ?></a><br/>
        <?php endif ?>

        <?php if ($this->getTrackingInfo()->getStatus()): ?>
            Status: <?= $this->getTrackingInfo()->getStatus() ?><br/>
        <?php endif ?>

        <?php if ($this->getTrackingInfo()->getDeliverydate()): ?>
            Delivery Date: <?= $this->getTrackingInfo()->getDeliverydate() ?><br/>
        <?php endif ?>

        <?php if ($this->getTrackingInfo()->getDeliverytime()): ?>
            Delivery Time: <?= $this->getTrackingInfo()->getDeliverytime() ?><br/>
        <?php endif ?>

        <?php if ($this->getTrackingInfo()->getDeliverylocation()): ?>
            Delivery Location: <?= $this->getTrackingInfo()->getDeliverylocation() ?><br/>
        <?php endif ?>

        <?php if ($this->getTrackingInfo()->getSignedby()): ?>
            Signed by: <?= $this->getTrackingInfo()->getSignedby() ?><br/>
        <?php endif ?>

        <?php if ($this->getTrackingInfo()->getTrackSummary()): ?>
            Tracking summary: <?= $this->getTrackingInfo()->getTrackSummary() ?><br/>
        <?php endif ?>

    <?php endif ?>
<?php endif ?>
</span>
