
<?php
$item = [];
	if (isset($payload)) {
		$texts = [];
		$hovers = [];
		$buttons = [];
		foreach ($payload as $key => $value) {
			
			if (preg_match('/^text(\d+)$/', $key, $matches)) {
            $index = $matches[1]; // Captura o número da imagem
            $texts[$index] = ['txt' => $value]; // Armazena no array temporário
			}
			
			if (preg_match('/^hover(\d+)$/', $key, $matches)) {
				$index = $matches[1];
				$hovers[$index] = ['hover' => $value];
			}
			if (preg_match('/^btn(\d+)$/', $key, $matches)) {
				$index = $matches[1];
				$buttons[$index] = ['btn' => $value];
			}
		}

		foreach ($texts as $index => $txtData) {
			$item[] = (object) array_merge(
				$txtData,
				$hovers[$index] ?? ['hover' => null],
				$buttons[$index] ?? ['btn' => null],
			);
		}

		$data = (object) [
			'title' => $payload->title->value ?? null,
			'subtitle' => $payload->subtitle->value ?? null,
			'service' => $item,
		];
	}
?>
<div class="bg-dark">
	<div class="container container-botton">
		<div class="header-counter">
			<div class="header-bottom d-flex justify-content-between">
				<div class="d-flex flex-column" style="width: 100%">
					<?php if(isset($data->title)): ?>
						<div class="d-flex justify-content-start align-items-stretch" style="width:100%; ">
							<div class="box-icon" style="width: 100%">
								<?php if(isset($data->title)): ?>
								<h2><strong><?php echo e($data->title); ?></strong></h2>
								<?php endif; ?>
							</div>
						</div>
					<?php endif; ?>
	
					<div class="d-flex justify-content-around">	
						<div class="d-flex flex-wrap service-content responsive-center" style="width: 100%;">
							<?php $__currentLoopData = $data->service; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
								<?php if(isset($item->txt)): ?>
									<div class="box-service d-flex">
										<div class="box-icon d-flex flex-column service-hover justify-content-end">
											<div class="main-icon service-icon">
												<div class="m-auto">
													<h2 class="font"><strong><?php echo e($item->txt->value); ?></strong></h2>
												</div>
											</div>
											<?php if(isset($item->hover)): ?>
											<div class="position-absolute hover-icon service-icon">
												<img class="rounded-4 m-0 object-fit-cover service-img" src="<?php echo e($item->hover->src); ?>" alt="<?php echo e($item->hover->alt); ?>">
											</div>

											<a href="<?php echo e(route('services.show', ['id' =>  $item->btn->href])); ?>" class="btn btn-primary service-btn rounded-bottom-4 rounded-top-0" target="<?php echo e($item->btn->target ?? '_blank'); ?>" style="z-index: 99"> <?php echo e($item->btn->value); ?> </a>
											<?php endif; ?>
										</div>
									</div>
								<?php endif; ?>
							<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
						</div>
					</div>
				</div>
	
			</div>
		</div>
	
		
	</div>
</div>

<!-- End Header Counter Area -->
<?php /**PATH /home/gphostc1/public_html/mazfer/resources/views/site/components/service.blade.php ENDPATH**/ ?>