<?php
/*
 * @package    ECLCDEK shipping plugin СДЭК to RadicalMart
 * @subpackage    ECLCDEK
 * @version    1.0.1
 * @author Econsult Lab.
 * @copyright  Copyright (c) 2025 Econsult Lab. All rights reserved.
 * @license    GNU/GPL license: https://www.gnu.org/copyleft/gpl.html
 * @link       https://econsultlab.ru
 */

defined('_JEXEC') or die;

use Joomla\CMS\Form\Form;

extract($displayData);

/**
 * Layout variables
 * -----------------
 *
 * @var  Form   $form     Form object.
 * @var  object $item     Checkout object.
 * @var  object $shipping Checkout shipping method object.
 *
 */

if (empty($shipping))
{
	return false;
}

?>
<div id="personal_shipping_method_<?php echo $shipping->id; ?>" class="uk-grid-small" uk-grid="">
    <div class="uk-width-1-3@s"><?php echo $form->renderField('country', $group); ?></div>
    <div class="uk-width-1-3@s"><?php echo $form->renderField('region', $group); ?></div>
    <div class="uk-width-1-3@s"><?php echo $form->renderField('city', $group); ?></div>
    <div class="uk-width-1-1@s"><?php echo $form->renderField('address', $group); ?></div>
    <?php if($shipping->params->get('delivery_options', "") === "door"):?>
        <?php if ($shipping->params->get('field_entrance', $defaultFieldsParams['entrance']) !== 'hidden'): ?>
            <div class="uk-width-1-3@s"><?php echo $form->renderField('entrance', $group); ?></div>
        <?php endif; ?>
        <?php if ($shipping->params->get('field_floor', $defaultFieldsParams['floor']) !== 'hidden'): ?>
            <div class="uk-width-1-3@s"><?php echo $form->renderField('floor', $group); ?></div>
        <?php endif; ?>
        <?php if ($shipping->params->get('field_apartment', $defaultFieldsParams['apartment']) !== 'hidden'): ?>
            <div class="uk-width-1-3@s"><?php echo $form->renderField('apartment', $group); ?></div>
        <?php endif; ?>
    <?php endif;?>
</div>

