@extends('layouts.app')
@php
$office = config('contact.office');
$labels = \App\Mail\ContactMessage::LABELS;
$pageUrl = route('contact.create');
$digits = fn ($v) => preg_replace('/\D+/', '', (string) $v);
// nomor dari .env diutamakan, jika kosong memakai nomor kantor
$waPublic = $digits(config('contact.wa_public') ?: $office['wa_public']);
$waInhouse = $digits(config('contact.wa_inhouse') ?: $office['wa_inhouse']);
$pretty = fn ($n) => preg_match('/^62(\d{3})(\d{4})(\d+)$/', $n, $m) ? "+62 {$m[1]}-{$m[2]}-{$m[3]}" : "+{$n}";
$wa = fn ($n, $text) => 'https://wa.me/'.$n.'?text='.rawurlencode($text);
$mapQuery = rawurlencode($office['map_query']);
$desc = 'Hubungi Value Consult: telepon, WhatsApp public training dan in-house training, email, serta alamat kantor pusat di Jakarta Selatan.';
// [ikon, judul, nilai, keterangan, tautan, tab baru]
$channels = [
['telephone-fill', 'Telepon Kantor', $office['phone'], 'Kantor pusat', 'tel:+62'.ltrim($digits($office['phone']), '0'), false],
['whatsapp', 'WhatsApp Public Training', $pretty($waPublic), 'Jadwal, harga, dan pendaftaran', $wa($waPublic, 'Halo Value Consult, saya ingin bertanya tentang Public Training.'), true],
['building-fill', 'WhatsApp In-House', $pretty($waInhouse), 'Program khusus perusahaan', $wa($waInhouse, 'Halo Value Consult, saya ingin berkonsultasi tentang Inhouse Training.'), true],
['envelope-fill', 'Email', $office['email'], 'Pertanyaan umum dan dokumen', 'mailto:'.$office['email'], false],
];
// [kolom, tipe, wajib, ikon, autocomplete, maxlength, placeholder, lebar penuh]
$groups = [
['Kirim Pesan', 'Isi form berikut, tim kami akan membalas melalui email atau WhatsApp.', [
['name', 'text', true, 'person', 'name', 100, 'Nama lengkap', false],
['email', 'email', true, 'envelope', 'email', 150, 'nama@perusahaan.com', false],
['phone', 'tel', false, 'whatsapp', 'tel', 25, '08xxxxxxxxxx', false],
['subject', 'text', true, 'chat-left-text', 'off', 150, 'Hal yang ingin ditanyakan', false],
['message', 'textarea', true, null, 'off', 3000, 'Tuliskan pesan Anda', true],
]],
];
@endphp
@section('title', 'Contact Us | Value Consult Training')
@section('description', $desc)
@section('canonical', $pageUrl)
@section('og_image', asset('images/assets/business-partnership.webp'))
@push('head')
@php
$graph = ['@context' => 'https://schema.org', '@graph' => [
['@type' => 'BreadcrumbList', 'itemListElement' => [
['@type' => 'ListItem', 'position' => 1, 'name' => 'Beranda', 'item' => url('/')],
['@type' => 'ListItem', 'position' => 2, 'name' => 'Contact Us', 'item' => $pageUrl],
]],
['@type' => 'ContactPage', '@id' => $pageUrl, 'url' => $pageUrl, 'name' => 'Contact Us', 'description' => $desc, 'inLanguage' => 'id-ID',
'mainEntity' => ['@type' => 'Organization', '@id' => url('/').'#organization', 'name' => 'Value Consult Training', 'legalName' => $office['company'], 'url' => url('/'),
'email' => $office['email'], 'telephone' => $office['phone'], 'sameAs' => array_column(config('contact.social'), 1),
'address' => ['@type' => 'PostalAddress', 'streetAddress' => $office['street'], 'addressLocality' => $office['city'], 'addressRegion' => $office['region'], 'postalCode' => $office['postal'], 'addressCountry' => 'ID']]],
]];
@endphp
@endpush
@section('content')
{{-- HERO --}}
Tanyakan jadwal public training, rancang program in-house, atau sampaikan kebutuhan lain kepada tim kami.
Contact Us
Terima kasih. Tim kami akan menindaklanjuti pesan Anda.