@php
	$total_columns = count(get_field('logos'));
@endphp
@if(have_rows('logos'))
	<section class="logo-showcase">
		<div class="logo-showcase__container">
			<div class="logo-showcase__logos">
				<div class="logo-showcase__logos__row" data-total-columns="{{ $total_columns }}">
					<div class="logo-showcase__logos__column">
						@while (have_rows('logos'))
							@php
								the_row();
								$logo = get_sub_field('logo');
								$link = get_sub_field('link');
							@endphp
							@if ($logo)
								@if ($link)
									<a href="{{ $link }}" target="_blank" class="logo-showcase__logos--container">
										<div class="logo-showcase__logos__image">
											@include("elements.image", ["image_id" => $logo])
										</div>
									</a>
								@else
									<div class="logo-showcase__logos--container">
										<div class="logo-showcase__logos__image">
											@include("elements.image", ["image_id" => $logo])
										</div>
									</div>
								@endif
							@endif
						@endwhile
					</div>
				</div>
			</div>			
		</div>
	</section>
@endif