<?php
/**
T4 Overide
 */

defined('_JEXEC') or die;
use Joomla\CMS\Language\Text;

/**
 * Marker_class: Class based on the selection of text, none, or icons
 * jicon-text, jicon-none, jicon-icon
 */
?>
<dl class="contact-address dl-horizontal row g-0" itemprop="address" itemscope itemtype="https://schema.org/PostalAddress">
	<?php if (($this->params->get('address_check') > 0) &&
		($this->item->address || $this->item->suburb  || $this->item->state || $this->item->country || $this->item->postcode)) : ?>
		<?php if ($this->params->get('address_check') > 0) : ?>
			<dt class="<?php echo "show-".$this->params->get('contact_icons') ?>">
				<span class="<?php echo $this->params->get('marker_class'); ?>" >
					<?php echo $this->params->get('marker_address'); ?>
				</span>
			</dt>
		<?php endif; ?>

		
		<?php if ($this->item->telephone && $this->params->get('show_telephone')) : ?>
			<div class="col-xs-6 col-md-6 col-xl-3">
				<dt class="<?php echo "show-".$this->params->get('contact_icons') ?>">
					<span class="<?php echo $this->params->get('marker_class'); ?>">
						<?php echo $this->params->get('marker_telephone'); ?>
					</span>
				</dt>
				<dd class="<?php echo "show-".$this->params->get('contact_icons') ?>">
					<span class="fa fa-phone icon"></span>
					<span class="contact-telephone info" itemprop="telephone">
						<span class="title"><?php echo Text::_('TPL_CONTACT_TELEPHONE_LABEL'); ?></span>
						<span class="txt"><?php echo nl2br($this->item->telephone); ?></span>
					</span>
				</dd>
			</div>
		<?php endif; ?>
		

		<?php if ($this->item->suburb && $this->params->get('show_suburb')) : ?>
			<div class="col-xs-6 col-md-6 col-xl-3">
				<dd class="<?php echo "show-".$this->params->get('contact_icons') ?>">
					<span class="fa fa-location-arrow icon"></span>
					<span class="contact-suburb info" itemprop="addressLocality">
						<span class="title"><?php echo Text::_('TPL_CONTACT_SUBURB_LABEL'); ?></span>
						<span class="txt"><?php echo $this->item->suburb .'<br/>'; ?></span>
					</span>
				</dd>
			</div>
		<?php endif; ?>
		<?php if ($this->item->state && $this->params->get('show_state')) : ?>
			<div class="col-xs-6 col-md-6 col-xl-3">
				<dd class="<?php echo "show-".$this->params->get('contact_icons') ?>">
					<span class="fa fa-location-arrow icon"></span>
					<span class="contact-state info" itemprop="addressRegion">
						<span class="title"><?php echo Text::_('TPL_CONTACT_STATE_LABEL'); ?></span>
						<span class="txt"><?php echo $this->item->state . '<br/>'; ?></span>
					</span>
				</dd>
			</div>
		<?php endif; ?>
		<?php if ($this->item->postcode && $this->params->get('show_postcode')) : ?>
			<div class="col-xs-6 col-md-6 col-xl-3">
				<dd class="<?php echo "show-".$this->params->get('contact_icons') ?>">
					<span class="fa fa-magic icon"></span>
					<span class="contact-postcode info" itemprop="postalCode">
						<span class="title"><?php echo Text::_('TPL_CONTACT_POSTCODE_LABEL'); ?></span>
						<span class="txt"><?php echo $this->item->postcode .'<br/>'; ?></span>
					</span>
				</dd>
			</div>
		<?php endif; ?>
		<?php if ($this->item->country && $this->params->get('show_country')) : ?>
			<div class="col-xs-6 col-md-6 col-xl-3">
				<dd class="<?php echo "show-".$this->params->get('contact_icons') ?>">
					<span class="fa fa-building-o icon"></span>
					<span class="contact-country info" itemprop="addressCountry">
						<span class="title"><?php echo Text::_('TPL_CONTACT_COUNTRY_LABEL'); ?></span>
						<span class="txt"><?php echo $this->item->country .'<br/>'; ?></span>
					</span>
				</dd>
			</div>
		<?php endif; ?>
	<?php endif; ?>

	
	<?php if ($this->item->email_to && $this->params->get('show_email')) : ?>
		<div class="col-xs-6 col-md-6 col-xl-3">
			<dt class="<?php echo "show-".$this->params->get('contact_icons') ?>">
				<span class="<?php echo $this->params->get('marker_class'); ?>" itemprop="email">
					<?php echo nl2br($this->params->get('marker_email') ?: ''); ?>
				</span>
			</dt>
			<dd class="<?php echo "show-".$this->params->get('contact_icons') ?>">
				<span class="fa fa-envelope-o icon"></span>
				<span class="contact-emailto info">
					<span class="title"><?php echo Text::_('TPL_CONTACT_EMAIL_LABEL'); ?></span>
					<span class="txt"><?php echo $this->item->email_to; ?></span>
				</span>
			</dd>
		</div>
	<?php endif; ?>
	
	<?php if ($this->item->address && $this->params->get('show_street_address')) : ?>
		<div class="col-xs-6 col-md-6 col-xl-3">
			<dd class="<?php echo "show-".$this->params->get('contact_icons') ?>">
				<span class="fa fa-map-marker icon"></span>
				<span class="contact-street info" itemprop="streetAddress">
					<span class="title"><?php echo Text::_('TPL_CONTACT_ADDRESS_LABEL'); ?></span>
					<span class="txt"><?php echo $this->item->address; ?></span>
				</span>
			</dd>
		</div>
	<?php endif; ?>
	
	<?php if ($this->item->fax && $this->params->get('show_fax')) : ?>
		<div class="col-xs-6 col-md-6 col-xl-3">
			<dt class="<?php echo "show-".$this->params->get('contact_icons') ?>">
				<span class="<?php echo $this->params->get('marker_class'); ?>">
					<?php echo $this->params->get('marker_fax'); ?>
				</span>
			</dt>
			<dd class="<?php echo "show-".$this->params->get('contact_icons') ?>">
				<span class="fa fa-print icon"></span>
				<span class="contact-fax info" itemprop="faxNumber">
					<span class="title"><?php echo Text::_('TPL_CONTACT_FAX_LABEL'); ?></span>
					<span class="txt"><?php echo nl2br($this->item->fax); ?></span>
				</span>
			</dd>
		</div>
	<?php endif; ?>
	
	<?php if ($this->item->mobile && $this->params->get('show_mobile')) :?>
		<div class="col-xs-6 col-md-6 col-xl-3">
			<dt class="<?php echo "show-".$this->params->get('contact_icons') ?>">
				<span class="<?php echo $this->params->get('marker_class'); ?>" >
					<?php echo $this->params->get('marker_mobile'); ?>
				</span>
			</dt>
			<dd class="<?php echo "show-".$this->params->get('contact_icons') ?>">
				<span class="fa fa-phone-square icon"></span>
				<span class="contact-mobile info" itemprop="telephone">
					<span class="title"><?php echo Text::_('TPL_CONTACT_MOBILE_LABEL'); ?></span>
					<span class="txt"><?php echo nl2br($this->item->mobile); ?></span>
				</span>
			</dd>
		</div>
	<?php endif; ?>
	
	<?php if ($this->item->webpage && $this->params->get('show_webpage')) : ?>
		<div class="col-xs-6 col-md-6 col-xl-3">
			<dt class="<?php echo "show-".$this->params->get('contact_icons') ?>">
				<span class="<?php echo $this->params->get('marker_class'); ?>" >
					<?php echo $this->params->get('marker_website'); ?>
				</span>
			</dt>
			<dd class="<?php echo "show-".$this->params->get('contact_icons') ?>">
				<span class="fa fa-globe icon"></span>
				<span class="contact-webpage info">
					<span class="title"><?php echo Text::_('TPL_CONTACT_WEBPAGE_LABEL'); ?></span>
					<a class="txt" href="<?php echo $this->item->webpage; ?>" target="_blank" itemprop="url">
					<?php echo $this->item->webpage; ?></a>
				</span>
			</dd>
		</div>
	<?php endif; ?>
	
</dl>
