@extends('layouts.site') @section('meta_title') {{ __('site.nav_contact') }} — {{ brand_name() }} @endsection @section('title', __('site.nav_contact')) @section('content') @php $locale = app()->getLocale(); $cu = $contactUs; $cfg = is_array($contactConfig ?? null) ? $contactConfig : \App\Support\SiteSettings::contactConfig(); $heroChips = brand_contact_hero_chips(); $trustItems = is_array($cfg['trust'] ?? null) ? $cfg['trust'] : []; $hours = is_array($cfg['hours'] ?? null) ? $cfg['hours'] : []; $checklist = is_array($cfg['repair_checklist'] ?? null) ? $cfg['repair_checklist'] : []; $mapUrl = filled($cfg['map_url'] ?? null) ? (string) $cfg['map_url'] : null; $specialties = is_array($specialties ?? null) ? $specialties : []; $checklistTitle = brand_trans(site_profile()->labelKey('contact_checklist_title') ?? 'site.contact_repair_title'); $checklistSub = brand_trans(site_profile()->labelKey('contact_checklist_sub') ?? 'site.contact_repair_sub'); $checklistCta = site_profile()->cta('primary'); $phone = $cu?->mobile ?: $cu?->cellphone; $phoneAlt = ($cu?->cellphone && $cu->cellphone !== $cu->mobile) ? $cu->cellphone : null; $email = $cu?->email; $whatsappHref = site_whatsapp_url(); if ($cu?->whatsapp) { $digits = preg_replace('/\D+/', '', (string) $cu->whatsapp); if ($digits !== '') { $whatsappHref = 'https://wa.me/'.$digits; } } $address = $cu ? locale_field($cu, 'address') : null; $brand = $cu ? locale_field($cu, 'name') : brand_name(); $intro = $cu ? \Illuminate\Support\Str::limit((string) (locale_field($cu, 'text') ?: locale_field($cu, 'subject') ?: ''), 420) : ''; $heroTitle = $cu ? trim((string) (locale_field($cu, 'subject') ?: '')) : ''; $heroSubRaw = $cu ? trim((string) (locale_field($cu, 'text') ?: '')) : ''; $heroSub = $heroSubRaw !== '' ? \Illuminate\Support\Str::of($heroSubRaw) ->replaceMatches('/[#*_`>-]+/u', ' ') ->replace("\r\n", ' ') ->replace("\n", ' ') ->squish() ->limit(220) ->toString() : ''; $heroImage = $cu?->heroImageUrl(); @endphp
filled($heroImage), ]) @if (filled($heroImage)) style="--contact-hero-image: url('{{ $heroImage }}')" @endif x-ref="hero" data-reveal="section" >

{{ $heroTitle !== '' ? $heroTitle : __('site.contact_hero_title') }}

{{ $heroSub !== '' ? $heroSub : brand_trans('site.contact_hero_sub') }}

@feature('repair_services') @endfeature {{ __('site.cta_whatsapp') }}
@if ($heroChips !== [])
    @foreach ($heroChips as $chip) @php $chipKey = (string) ($chip['key'] ?? ''); $chipIcon = (string) ($chip['icon'] ?? 'repair'); @endphp @if ($chipKey !== '')
  • {{ __('site.contact_chip_'.$chipKey) }}
  • @endif @endforeach
@endif
@if ($cu && ($phone || $email || $whatsappHref || $address))
@endif @if ($trustItems !== [])
@foreach ($trustItems as $item) @php $tIcon = (string) ($item['icon'] ?? 'repair'); $tLabel = \App\Support\SiteSettings::localizedContactText($item['label'] ?? []); $tValue = \App\Support\SiteSettings::localizedContactText($item['value'] ?? []); @endphp @if ($tLabel !== '' || $tValue !== '')

{{ $tValue }}

{{ $tLabel }}

@endif @endforeach
@endif
@if ($checklist !== [])

{{ $checklistTitle }}

{{ $checklistSub }}

    @foreach ($checklist as $row) @php $rIcon = (string) ($row['icon'] ?? 'check'); $rLabel = \App\Support\SiteSettings::localizedContactText($row['label'] ?? []); @endphp @if ($rLabel !== '')
  • {{ $rLabel }}
  • @endif @endforeach
@if (($checklistCta['intent'] ?? null) || ($checklistCta['url'] ?? null)) @if ($checklistCta['url'] ?? null) {{ $checklistCta['label'] !== '' ? $checklistCta['label'] : __('site.contact_repair_cta') }} @else @endif @endif
@endif @unless ($cu)

{{ __('site.empty_contact') }}

@feature('repair_services') @endfeature
@endunless
@if ($brand)

{{ $brand }}

@endif @if ($intro !== '')

{{ $intro }}

@else

{{ brand_trans('site.contact_hero_sub') }}

@endif @feature('repair_services') @endfeature
@if ($specialties !== [])

{{ __('site.contact_specialties_title') }}

{{ __('site.contact_specialties_sub') }}

@feature('repair_services') @endfeature {{ __('site.cta_whatsapp') }}
@endif @feature('repair_services') @endfeature
@endsection