@extends('frontend::layouts.master') @section('content')

{!! $menu_contact['name'] ?? '' !!}

@if (!empty($page_init['contact']['office']))
pin

@lang('frontend::lang.contact.address')

{!! $page_init['contact']['office'] ?? '' !!}

@endif @if (!empty($page_init['contact']['tel']))
tele

@lang('frontend::lang.contact.tel')

{{ $page_init['contact']['tel'] ?? '' }}

@endif @if (!empty($page_init['contact']['email']))
mail

@lang('frontend::lang.contact.email')

{{ $page_init['contact']['email'] ?? '' }}

@endif @if (!empty($page_init['contact']['social'])) @php // กรองเฉพาะตัวที่มี url เท่านั้น $socialWithUrl = array_filter($page_init['contact']['social'], function ($item) { return !empty($item['url']); }); @endphp @if (count($socialWithUrl) > 0)

@lang('frontend::lang.contact.follow')

@foreach ($socialWithUrl as $key => $value) @php $map = [ 'facebook' => 'f', 'line' => 'l', 'youtube' => 'y', 'twitter' => 'x', 'instagram' => 'i', 'tiktok' => 't', ]; $image = $map[$key] ?? ''; @endphp @endforeach
@endif @endif
@if (!empty($page_init['contact']['google_map']))
{!! $page_init['contact']['google_map'] ?? '' !!}
@endif

@lang('frontend::lang.contact.msg_title')

@lang('frontend::lang.contact.msg_content')

@livewire('frontend::contact.form')
@endsection