<!DOCTYPE html>
<html lang="pt-br">
<head>

	<?php require 'analitycshead.php'; ?>
	<base href="<?= (!is_null($setting) && !empty($setting->getUrl())) ? $setting->getUrl() : URL_BASE; ?>">
	<meta charset="utf-8">
	<meta http-equiv="content-language" content="pt-br">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta http-equiv="cache-control" content="public"/>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="robots" content="index, follow">
	
	<title><?= (!is_null($setting) && !empty($setting->getTitle())) ? $setting->getTitle() : 'Kimpages | Agência Mazukim' ?></title>

	<link rel="icon" href="<?= (!is_null($brand) && !empty($brand->getIcon())) ? $brand->getIcon() : ''; ?>" sizes="16x16">
	<?php require("links.php"); ?>

</head>
<body>
	<?php  session_start();
	if (isset($_GET['campaign'])) {
			$campaign = $_GET['campaign'];
			
			$_SESSION['campanha'] = $campaign;

			} else {

			$_SESSION['campanha'] = 'Campanha não vinculada';

			}
		?> 
	<?php require 'analitycsbody.php'; ?>

	<?php if(!is_null($setting) && !empty($setting->getWhatsapp())): ?>
		<aside class="row whatsapp">
			<div class="float">
				<p>Preencha o formulário abaixo e fale pelo WhatsApp com um dos nossos Consultores. É Rapidinho : )</p>
				<form role="form" class="form-horizontal whats" action="leads/whatsapp" method="POST">
					
					<div class="step-1">
						<div class="form-group">
							<label for="name" class="control-label col-sm-2">Nome:</label>
							<div class="col-sm-10">
								<input type="text" id="Nome" name="name" class="form-control" required />
							</div>
						</div>
						<div class="form-group">
							<label for="email" class="control-label col-sm-2">E-mail:</label>
							<div class="col-sm-10">
								<input type="text" id="Email" name="email" class="form-control" required/>
							</div>
						</div>
						<div class="form-group">
							<label for="whatsapp" class="control-label col-sm-2">Telefone/WhatsApp:</label>
							<div class="col-sm-10">
								<input type="text" id="Telefone" name="whatsapp" class="form-control" required placeholder="(ddd) + número" maxlength="50" />
							</div>
						</div>
					</div>
	

					<div class="step-2">
					<input id="historico_descricao" name="historico_descricao" type="hidden" value=" <?= $_SESSION['campanha'] ?>" />
					<input type="hidden" name="utm_source" value="<?= isset($_GET['utm_source']) ? $_GET['utm_source'] : '' ?>">
					<input type="hidden" name="utm_campaign" value="<?= isset($_GET['utm_campaign']) ? $_GET['utm_campaign'] : '' ?>">
					<input type="hidden" name="utm_medium" value="<?= isset($_GET['utm_medium']) ? $_GET['utm_medium'] : '' ?>">
					<input type="hidden" name="utm_term" value="<?= isset($_GET['utm_term']) ? $_GET['utm_term'] : '' ?>">
					<input type="hidden" name="utm_adGroup" value="<?= isset($_GET['utm_adGroup']) ? $_GET['utm_adGroup'] : '' ?>">
					<input type="hidden" name="utm_network" value="<?= isset($_GET['utm_network']) ? $_GET['utm_network'] : '' ?>">
					<input type="hidden" name="utm_partner" value="<?= isset($_GET['utm_partner']) ? $_GET['utm_partner'] : '' ?>">
					<input type="hidden" name="utm_device" value="<?= isset($_GET['utm_device']) ? $_GET['utm_device'] : '' ?>">
					<input type="hidden" name="utm_device_model" value="<?= isset($_GET['utm_device_model']) ? $_GET['utm_device_model'] : '' ?>">
					<input type="hidden" name="utm_ads" value="<?= isset($_GET['utm_ads']) ? $_GET['utm_ads'] : '' ?>">
					<input type="hidden" name="utm_local" value="<?= isset($_GET['utm_local']) ? $_GET['utm_local'] : '' ?>">
					<input type="hidden" name="utm_referrer" value="<?= isset($_GET['utm_referrer']) ? $_GET['utm_referrer'] : '' ?>">
					<input type="hidden" name="utm_placement" value="<?= isset($_GET['utm_placement']) ? $_GET['utm_placement'] : '' ?>">
					<input type="hidden" name="gclid" value="<?= isset($_GET['gclid']) ? $_GET['gclid'] : '' ?>">
					<input type="hidden" name="fbclid" value="<?= isset($_GET['fbclid']) ? $_GET['fbclid'] : '' ?>">
					<input type="hidden" name="li_fat_id" value="<?= isset($_GET['li_fat_id']) ? $_GET['li_fat_id'] : '' ?>">
					<input type="hidden" name="ttclid" value="<?= isset($_GET['ttclid']) ? $_GET['ttclid'] : '' ?>">
					<input type="hidden" name="msclkid" value="<?= isset($_GET['msclkid']) ? $_GET['msclkid'] : '' ?>">
					<input type="hidden" name="twclid" value="<?= isset($_GET['twclid']) ? $_GET['twclid'] : '' ?>">
					<input type="hidden" name="pinterest_ct" value="<?= isset($_GET['pinterest_ct']) ? $_GET['pinterest_ct'] : '' ?>">
					<input type="hidden" name="scclid" value="<?= isset($_GET['scclid']) ? $_GET['scclid'] : '' ?>">
					<input type="hidden" name="utm_p1" value="<?= isset($_GET['utm_p1']) ? $_GET['utm_p1'] : '' ?>">
					<input type="hidden" name="utm_p2" value="<?= isset($_GET['utm_p2']) ? $_GET['utm_p2'] : '' ?>">
					<input type="hidden" name="utm_p3" value="<?= isset($_GET['utm_p3']) ? $_GET['utm_p3'] : '' ?>">

						<input type="hidden" style="display: none !important" name="code" value="<?= (isset($_GET['gclid']) || isset($_GET['fbclid'])) ?? (isset($_GET['gclid'])) ? $_GET['gclid'] : $_GET['fbclid'] ?? '' ?>">
						<input type="hidden" style="display: none !important" name="url" value="<?php if(isset($_SERVER['HTTP_REFERER'])): echo $_SERVER['HTTP_REFERER']; else: echo URL_BASE.'index.php'; endif;?>">
						<input type="hidden" name="origin" value="<?php
							if (isset($_GET['gclid'])) {
								echo 'Google Ads';
							} elseif (isset($_GET['fbclid'])) {
								echo 'Facebook Ads';
							} else{
								echo 'Acesso Direto';
							}
						?>">

					</div>
					<button <?= (!empty($config['GOOGLEADS']['CODE']) && $config['GOOGLEADS']['GOALWHATSAPP']) ? "onclick='updateAndTrack()'" : "onclick='updateAndTrack()'"; ?> class="btn waves-effect disa" type="submit">Iniciar a conversa</button>
				</form>
			</div>
			<button type="button" class="btn-floating waves-effect pulse">
				<span class="fab fa-whatsapp"></span>
				ESTAMOS ONLINE
				<strong><?= $setting->getWhatsapp(); ?></strong>
			</button>
		</aside>
	<?php endif; ?>

	<header class="row headline">
		<figure>
			<img src="<?= (!is_null($banner) && !empty($banner->getImage())) ? $banner->getImage() : 'public/site/images/headline.png'; ?>" alt="">
			<img src="<?= (!is_null($brand) && !empty($brand->getLogo())) ? $brand->getLogo() : 'public/site/images/logo.png'; ?>" alt="<?= (!is_null($setting) && !empty($setting->getTitle())) ? $setting->getTitle() : 'Kimpages | Agência Mazukim' ?>">
			<figcaption><?= (!is_null($setting) && !empty($setting->getTitle())) ? $setting->getTitle() : 'Kimpages | Agência Mazukim' ?></figcaption>
		</figure>
		<h1><?= (!is_null($banner) && !empty($banner->getTitle())) ? $banner->getTitle() : 'Kimpages - Agência Mazukim' ?></h1>
		<p><?= (!is_null($banner) && !empty($banner->getDescription())) ? $banner->getDescription() : 'Comece editando sua Kimpages Agora Mesmo!!!' ?></p>
		<?php if(is_null($banner)): ?>
			<a target="_blank" href="admin" class="btn waves-effect" style="margin-top: 10px;">
				Ir para o painel
			</a>
		<?php endif; ?>
		<?php if(!is_null($simulator) && !empty($simulator)): ?>
			<fieldset>
				<form action="leads/persist" method="POST" enctype="multipart/form-data">
					<?php 
						$count = 1;
						foreach ($simulator as $chave => $item): 
							if($item->getType() == 'text'):
					?>
						<label class="steps" id="step-<?= $count; ?>">
							<?= $item->getName(); ?>
							<input type="text" name="steps[<?= $item->getId(); ?>]" placeholder="Escreva aqui" <?= ($item->getRequired() == 1) ? 'required' : ''; ?>>
						</label>
					<?php elseif($item->getType() == 'tel'): ?>
						<label class="steps" id="step-<?= $count; ?>">
							<?= $item->getName(); ?>
							<input class="phone" type="tel" pattern="\([0-9]{2}\) [0-9]{5}-[0-9]{4}" name="steps[<?= $item->getId(); ?>]" placeholder="Apenas números" <?= ($item->getRequired() == 1) ? 'required' : ''; ?>>
						</label>
					<?php elseif($item->getType() == 'email'): ?>
						<label class="steps" id="step-<?= $count; ?>">
							<?= $item->getName(); ?>
							<input type="email" name="steps[<?= $item->getId(); ?>]" placeholder="exemplo@dominio.com.br" <?= ($item->getRequired() == 1) ? 'required' : ''; ?>>
						</label>
					<?php elseif($item->getType() == 'file'): ?>
						<label class="steps" id="step-<?= $count; ?>">
							<?= $item->getName(); ?>
							<input type="file" name="steps[<?= $item->getId(); ?>]" <?= ($item->getRequired() == 1) ? 'required' : ''; ?>>
							<input type="hidden" name="steps[<?= $item->getId(); ?>]" <?= ($item->getRequired() == 1) ? 'required' : ''; ?> value="file">
						</label>
					<?php 
						elseif($item->getType() == 'select'):
						$options = explode(',', $item->getOptions());
					?>
						<label class="steps" id="step-<?= $count; ?>">
							<?= $item->getName(); ?>
							<select name="steps[<?= $item->getId(); ?>]" class="browser-default" <?= ($item->getRequired() == 1) ? 'required' : ''; ?>>
								<?php foreach ($options as $value): ?>
									<option value="<?= $value; ?>"><?= $value; ?></option>
								<?php endforeach; ?>
							</select>
						</label>
					<?php 
						elseif($item->getType() == 'radio'):
						$options = explode(',', $item->getOptions());
					?>
						<label class="steps" id="step-<?= $count; ?>">
							<?= $item->getName(); ?>
							<div class="flex">
								<?php foreach ($options as $key => $value): ?>
									<p>
										<input id="elem-<?= $key . $count; ?>" name="steps[<?= $item->getId(); ?>]" type="radio" <?= ($item->getRequired() == 1) ? 'required' : ''; ?> value="<?= $value; ?>" />
										<label for="elem-<?= $key . $count; ?>"><?= $value; ?></label>
									</p>
								<?php endforeach; ?>
							</div>
						</label>
					<?php 
						elseif ($item->getType() == 'checkbox'):
							$options = explode(',', $item->getOptions());
						?>
							<label class="steps" id="step-<?= $count; ?>">
								<?= $item->getName(); ?>
								<div class="flex">
									<?php foreach ($options as $key => $value): ?>
										<p>
											<input id="check-<?= $key . $count; ?>" 
												name="check" 
												type="checkbox" 
												<?= ($item->getRequired() == 1) ? 'required' : ''; ?> 
												value="<?= $value; ?>" 
												class="checkbox-option" />
											<label for="check-<?= $key . $count; ?>"><?= $value; ?></label>
										</p>
									<?php endforeach; ?>
								</div>
								<input type="hidden" name="steps[<?= $item->getId(); ?>]" value="">
							</label>
					<?php elseif($item->getType() == 'number'): ?>
						<label class="steps" id="step-<?= $count; ?>">
							<?= $item->getName(); ?>
							<div class="number">
								<input type="number" name="steps[<?= $item->getId(); ?>]" value="<?= $item->getMinQ(); ?>" min="<?= $item->getMinQ(); ?>" max="<?= $item->getMaxQ(); ?>" placeholder="" <?= ($item->getRequired() == 1) ? 'required' : ''; ?>>
								<hgroup>
									<button type="button" class="plus"><span class="fa fa-plus"></span></button>
									<button type="button" class="minus"><span class="fa fa-minus"></span></button>
								</hgroup>
							</div>
						</label>
					<?php elseif($item->getType() == 'date'): ?>
						<label class="steps" id="step-<?= $count; ?>">
							<?= $item->getName(); ?>
							<input type="date" name="steps[<?= $item->getId(); ?>]" <?= ($item->getRequired() == 1) ? 'required' : ''; ?>>
						</label>
					<?php elseif($item->getType() == 'money'): ?>
						<label class="steps" id="step-<?= $count; ?>">
							<?= $item->getName(); ?>
							<input type="tel" name="steps[<?= $item->getId(); ?>]" value="<?= $item->getMinQ(); ?>" class="mask" <?= ($item->getRequired() == 1) ? 'required' : ''; ?>>
						</label>
					<?php elseif($item->getType() == 'textarea'): ?>
						<label class="steps" id="step-<?= $count; ?>">
							<?= $item->getName(); ?>
							<textarea name="steps[<?= $item->getId(); ?>]" placeholder="Comente aqui" <?= ($item->getRequired() == 1) ? 'required' : ''; ?> maxlength="<?= $item->getMaxLength(); ?>" data-length="<?= $item->getMaxLength(); ?>"></textarea>
						</label>
					<?php endif; $count++; endforeach; ?>
					<input type="hidden" name="origin" value="<?php
						if (isset($_GET['gclid'])) {
							echo 'Google Ads';
						} elseif (isset($_GET['fbclid'])) {
							echo 'Facebook Ads';
						} else{
							echo 'Acesso Direto';
						}
					?>">
					<input id="historico_descricao" name="historico_descricao" type="hidden" value=" <?= $_SESSION['campanha'] ?>" />

					<input type="hidden" name="utm_source" value="<?= isset($_GET['utm_source']) ? $_GET['utm_source'] : '' ?>">
					<input type="hidden" name="utm_campaign" value="<?= isset($_GET['utm_campaign']) ? $_GET['utm_campaign'] : '' ?>">
					<input type="hidden" name="utm_medium" value="<?= isset($_GET['utm_medium']) ? $_GET['utm_medium'] : '' ?>">
					<input type="hidden" name="utm_term" value="<?= isset($_GET['utm_term']) ? $_GET['utm_term'] : '' ?>">
					<input type="hidden" name="utm_adGroup" value="<?= isset($_GET['utm_adGroup']) ? $_GET['utm_adGroup'] : '' ?>">
					<input type="hidden" name="utm_network" value="<?= isset($_GET['utm_network']) ? $_GET['utm_network'] : '' ?>">
					<input type="hidden" name="utm_partner" value="<?= isset($_GET['utm_partner']) ? $_GET['utm_partner'] : '' ?>">
					<input type="hidden" name="utm_device" value="<?= isset($_GET['utm_device']) ? $_GET['utm_device'] : '' ?>">
					<input type="hidden" name="utm_device_model" value="<?= isset($_GET['utm_device_model']) ? $_GET['utm_device_model'] : '' ?>">
					<input type="hidden" name="utm_ads" value="<?= isset($_GET['utm_ads']) ? $_GET['utm_ads'] : '' ?>">
					<input type="hidden" name="utm_local" value="<?= isset($_GET['utm_local']) ? $_GET['utm_local'] : '' ?>">
					<input type="hidden" name="utm_referrer" value="<?= isset($_GET['utm_referrer']) ? $_GET['utm_referrer'] : '' ?>">
					<input type="hidden" name="utm_placement" value="<?= isset($_GET['utm_placement']) ? $_GET['utm_placement'] : '' ?>">
					<input type="hidden" name="gclid" value="<?= isset($_GET['gclid']) ? $_GET['gclid'] : '' ?>">
					<input type="hidden" name="fbclid" value="<?= isset($_GET['fbclid']) ? $_GET['fbclid'] : '' ?>">
					<input type="hidden" name="li_fat_id" value="<?= isset($_GET['li_fat_id']) ? $_GET['li_fat_id'] : '' ?>">
					<input type="hidden" name="ttclid" value="<?= isset($_GET['ttclid']) ? $_GET['ttclid'] : '' ?>">
					<input type="hidden" name="msclkid" value="<?= isset($_GET['msclkid']) ? $_GET['msclkid'] : '' ?>">
					<input type="hidden" name="twclid" value="<?= isset($_GET['twclid']) ? $_GET['twclid'] : '' ?>">
					<input type="hidden" name="pinterest_ct" value="<?= isset($_GET['pinterest_ct']) ? $_GET['pinterest_ct'] : '' ?>">
					<input type="hidden" name="scclid" value="<?= isset($_GET['scclid']) ? $_GET['scclid'] : '' ?>">
					<input type="hidden" name="utm_p1" value="<?= isset($_GET['utm_p1']) ? $_GET['utm_p1'] : '' ?>">
					<input type="hidden" name="utm_p2" value="<?= isset($_GET['utm_p2']) ? $_GET['utm_p2'] : '' ?>">
					<input type="hidden" name="utm_p3" value="<?= isset($_GET['utm_p3']) ? $_GET['utm_p3'] : '' ?>">
					
					<input type="hidden" name="code" value="<?= (isset($_GET['gclid']) || isset($_GET['fbclid'])) ?? (isset($_GET['gclid'])) ? $_GET['gclid'] : $_GET['fbclid'] ?? '' ?>">
					<input type="hidden" name="url" value="<?php if(isset($_SERVER['HTTP_REFERER'])): echo $_SERVER['HTTP_REFERER']; else: echo URL_BASE.'index'; endif;?>">
					<div class="foot center">
						<hgroup>
							<button type="button" class="prev">
								<span class="fa fa-long-arrow-alt-left"></span>
							</button>
							<button type="button" class="next">
								<p>Iniciar Simulação</p>
								<span class="fa fa-long-arrow-alt-right"></span>
							</button>
						</hgroup>
						<button type="submit" class="btn waves-effect">Enviar Simulação</button>
					</div>
				</form>
			</fieldset>
		<?php endif; ?>
		<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="#0099ff" fill-opacity="1" d="M0,128L48,117.3C96,107,192,85,288,112C384,139,480,213,576,218.7C672,224,768,160,864,154.7C960,149,1056,203,1152,213.3C1248,224,1344,192,1392,176L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>
	</header>

	<?php if(!is_null($service) && !empty($service)): ?>
		<section class="row services">
			<div class="owl-nav double">
				<button type="button" role="presentation" class="owl-prev">Anterior</button>
				<button type="button" role="presentation" class="owl-next">Próximo</button>
			</div>
			<div class="owl-carousel">
				<?php foreach ($service as $item): ?>
					<article class="item">
						<div class="col m6 s12">
							<h2><?= $item->getTitle(); ?></h2>
							<?= $item->getDescription(); ?>
						</div>
						<figure class="col m6 s12">
							<?php if (strpos($item->getImage(), 'public/') !== false): ?>
								<img src="<?= $item->getImage(); ?>" alt="<?= $item->getTitle(); ?>">
								<figcaption><?= $item->getTitle(); ?></figcaption>
							<?php else: ?>
								<iframe width="100%" height="315" 
									src="https://www.youtube.com/embed/<?= $item->getImage(); ?>" 
									title="<?= $item->getTitle(); ?>" 
									frameborder="0" 
									allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture" 
									allowfullscreen>
								</iframe>
							<?php endif; ?>
						</figure>
					</article>
				<?php endforeach; ?>
			</div>
		</section>
	<?php endif; ?>

	<?php if(!is_null($company) && !empty($company)): ?>
		<section class="row empresa">
			<article class="col m6 s12">
				<h2><?= $company->getTitle(); ?></h2>
				<?= $company->getDescription(); ?>
			</article>
			<figure>
				<img src="<?= (!is_null($company) && !empty($company->getImage())) ? $company->getImage() : 'public/site/images/empresa.png'; ?>" alt="">
			</figure>
		</section>
	<?php endif; ?>

	<?php 
		if(!is_null($questions) && !empty($questions)):
			$half = round(count($questions) / 2);
			$count = 0;
		?>
		<section class="row questions">
			<h2>Perguntas Frequentes</h2>
			<div class="col m6 s12">
				<ul class="collapsible" id="double-1">
					<?php foreach ($questions as $item): ?>
						<li>
							<div class="collapsible-header">
								<div class="svg">
									<span class="fa fa-plus-square"></span>
								</div>
								<h3>
									<?= $item->getQuestion(); ?>
									<span class="fa fa-angle-down"></span>
								</h3>
							</div>
							<div class="collapsible-body">
								<?= $item->getAnswer(); ?>
							</div>
						</li>
					<?php 
					$count++;
					if ($count == $half): ?>
				</ul>
			</div>
			<div class="col m6 s12">
				<ul class="collapsible" id="double-2">
					<?php endif; endforeach; ?>
				</ul>
			</div>
		</section>
	<?php endif; ?>

	<?php if(!is_null($testimony) && !empty($testimony)): ?>
		<section class="row depoimentos">
			<div class="container owl-carousel">
				<?php foreach ($testimony as $item): ?>
					<article class="item">
						<div class="svg">
							<span class="fa fa-quote-left"></span>
						</div>
						<figure>
							<img src="<?= $item->getImage(); ?>" alt="<?= $item->getName(); ?>">
							<figcaption><?= $item->getName(); ?></figcaption>
						</figure>
						<hgroup>
							<q><?= $item->getTestimony(); ?></q>
							<cite><?= $item->getName(); ?></cite>
							<small><?= $item->getCity(); ?></small>
						</hgroup>
					</article>
				<?php endforeach; ?>
			</div>
		</section>
	<?php endif; ?>

	<?php if(!is_null($social) && !empty($social->getInstagram()) && $social->getPlugin() == 1): ?>
		<section class="row instagram">
			<h2><strong>Siga no Instagram</strong>@<span id="userInsta"><?= $social->getInstagram(); ?></span></h2>
			<hr>
			<div class="clearfix"></div>
			<div id="instagram"></div>
		</section>
	<?php endif; ?>

	<?php if(!is_null($galery) && !empty($galery)): ?>
		<section class="row galery" id="gallery">
			<?php foreach ($galery as $item): ?>
				<a href="<?= $item->getImage(); ?>" class="col s12 m6 l3" data-sub-html="<h4><?= $item->getTitle() ?></h4><p><?= $item->getDescription() ?></p>">
					<img src="<?= $item->getImage(); ?>" />
				</a>
			<?php endforeach; ?>
		</section>
	<?php endif; ?>

	<?php if(!is_null($setting) && !empty($setting)): ?>
		<footer class="row footer">
			<figure>
				<img src="<?= (!is_null($brand) && !empty($brand->getLogo())) ? $brand->getLogo() : 'public/site/images/logo.png'; ?>" alt="<?= (!is_null($setting) && !empty($setting->getTitle())) ? $setting->getTitle() : 'Kimpages | Agência Mazukim' ?>">
				<figcaption><?= (!is_null($setting) && !empty($setting->getTitle())) ? $setting->getTitle() : 'Kimpages | Agência Mazukim' ?></figcaption>
			</figure>
			<hgroup>
				<p>@Todos os Direitos Reservados - <?= (!is_null($setting) && !empty($setting->getTitle())) ? $setting->getTitle() : 'Kimpages | Agência Mazukim' ?>
				.<br>
            	<?= (isset($setting) && !is_null($setting) && !empty($setting->getCnpj())) ? "CNPJ: ". $setting->getCnpj() : '' ?>
			</p>
				<a href="https://mazukim.com.br" target="_blank" rel="noopener noreferrer">
					Produto Desenvolvido pela
					<img src="public/site/images/mazukim.png" alt="">
				</a>

								<a class="button-denuncie"href="<?=URL_BASE?>denuncie" target="_blank" rel="noopener noreferrer">
					Denuncie aqui
				</a>
			</hgroup>
			<hgroup>
				<?php if(!is_null($social) && !empty($social)): ?>
					<ul>
						<?php if(!empty($social->getFacebook())): ?>
							<li>
								<a href="https://www.facebook.com/<?= $social->getFacebook(); ?>" target="_blank">
									<span class="fab fa-facebook"></span>
								</a>
							</li>
						<?php endif; ?>
						<?php if(!empty($social->getInstagram())): ?>
							<li>
								<a href="https://www.instagram.com/<?= $social->getInstagram(); ?>" target="_blank">
									<span class="fab fa-instagram"></span>
								</a>
							</li>
						<?php endif; ?>
						<?php if(!empty($social->getLinkedin())): ?>
							<li>
								<a href="https://www.linkedin.com/<?= $social->getLinkedin(); ?>" target="_blank">
									<span class="fab fa-linkedin-in"></span>
								</a>
							</li>
						<?php endif; ?>
						<?php if(!empty($social->getYoutube())): ?>
							<li>
								<a href="https://www.youtube.com/<?= $social->getYoutube(); ?>" target="_blank">
									<span class="fab fa-youtube"></span>
								</a>
							</li>
						<?php endif; ?>
					</ul>
				<?php endif; ?>
				<?php if(!is_null($setting) && !empty($setting->getEmail())): ?>
					<a href="mailto:<?= $setting->getEmail(); ?>">
						<?= $setting->getEmail(); ?>
					</a>
				<?php endif; ?>
			</hgroup>
		</footer>
	<?php endif; ?>

	<?php require 'scripts.php'; ?>
	<script>
	document.addEventListener('DOMContentLoaded', function () {
    const checkboxes = document.querySelectorAll('.checkbox-option'); 

    function checkRequired() {
        let checked = false;
        
        checkboxes.forEach(function (checkbox) {
            if (checkbox.checked) {
                checked = true;
            }
        });

        checkboxes.forEach(function (checkbox) {
            if (checked) {
                checkbox.removeAttribute('required');
            } else {
                checkbox.setAttribute('required', 'true');
            }
        });
    }

    checkboxes.forEach(function (checkbox) {
        checkbox.addEventListener('change', checkRequired);
    });

    checkRequired();
});
</script>
</body>
</html>