@extends('frontend::layouts.app')
@section('title')
    {{ $data['title'] }}
@endsection
@section('meta_keywords')
    {{ $data['meta_keywords'] }}
@endsection
@section('meta_description')
    {{ $data['meta_description'] }}
@endsection

<?php
$contact = \App\Models\Page::where('code', 'contact')->where('locale', app()->getLocale())->where('theme', site_theme())->first();
$contactData = $contact ? json_decode($contact->data, true) : null;
?>

@section('content')
    <div class="td-page-header">
        <div class="container">
            <div class="td-page-header-indicator">
                <ul>
                    <li>
                        <a href="{{ url('/') }}">{{ __('Home') }}</a>
                    </li>
                    <li>
                        <a href="{{ request()->fullUrl() }}">{{ __('Contact Us') }}</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="td-page-header-element">
            <img src="{{ asset('frontend/default/img/elements/header-shape.png') }}" alt="">
        </div>
        <div class="td-page-header-elementLeft">
            <img src="{{ asset('frontend/default/img/elements/header-shape-left.png') }}" alt="">
        </div>
    </div>
    <section class="td-contact-page td-contact-page-2">
        <div class="td-contact-page-wrapper">
            <div class="td-contact-page-left">
                <h5>{{ $contactData['title'] }}</h5>
                <a href="tel:{{ $contactData['contact_one_value'] }}" class="td-contact-page-left-card">
                    <span class="td-contact-page-left-card-icon">
                        <i class="text-white {{ $contactData['contact_one_icon'] }}"></i>
                    </span>
                    <span>{{ $contactData['contact_one_value'] }}</span>
                </a>
                <a href="mailto:{{ $contactData['contact_two_value'] }}" class="td-contact-page-left-card">
                    <span class="td-contact-page-left-card-icon">
                        <i class="text-white {{ $contactData['contact_two_icon'] }}"></i>
                    </span>
                    <span>{{ $contactData['contact_two_value'] }}</span>
                </a>
                <a href="tel:{{ $contactData['contact_three_value'] }}" class="td-contact-page-left-card">
                    <span class="td-contact-page-left-card-icon">
                        <i class="text-white {{ $contactData['contact_three_icon'] }}"></i>
                    </span>
                    <span>{{ $contactData['contact_three_value'] }}</span>
                </a>
            </div>
            <div class="td-contact-page-right">
                <form class="common-form" action="{{ route('mail-send') }}" method="POST">
                    @csrf
                    <div class="form-floating common-form-item">
                        <input type="text" name="name" class="form-control" id="floatingInput" placeholder="name"
                            required>
                        <label for="floatingInput">{{ __('Name') }}</label>
                    </div>
                    <div class="form-floating common-form-item">
                        <input type="email" name="email" class="form-control" id="floatingEmail"
                            placeholder="name@example.com" required>
                        <label for="floatingEmail">{{ __('Email') }}</label>
                    </div>
                    <div class="form-floating common-form-item">
                        <input type="text" name="subject" class="form-control" id="floatingSubject" placeholder="subject"
                            required>
                        <label for="floatingEmail">{{ __('Subject') }}</label>
                    </div>
                    <div class="form-floating common-form-item">
                        <textarea name="msg" class="form-control" placeholder="Leave a message here" id="floatingTextarea" required></textarea>
                        <label for="floatingTextarea">{{ __('Message') }}</label>
                    </div>
                    <div class="common-form-button">
                        <button type="submit" class="td-btn td-btn-green td-btn-xl">
                            <span class="td-btn-wrap">
                                <span class="td-btn-y-1">{{ $contactData['form_button_title'] }}</span>
                                <span class="td-btn-y-2">{{ $contactData['form_button_title'] }}</span>
                            </span>
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </section>
@endsection
