@extends('front.layout.pages-layout')
@section('pageTitle', isset($pageTitle) ? $pageTitle : 'Document Title')
@section('meta_tags')
    {!! SEO::generate() !!}}
@endsection
@section('content')
    <section class="section">
        <div class="container">
            <div class="row">
                <div class="col-12">
                    <div class="mb-5 d-flex align-items-center">
                        <h3 class="title-color">Kontaktieren Sie uns</h3>
                        <ul class="list-inline social-icons ml-auto mr-3 d-none d-sm-block">
                            @if (site_social_links()->facebook_url)
                                <li class="list-inline-item">
                                    <a href="{{ site_social_links()->facebook_url }}" target="_blank">
                                        <i class="ti-facebook"></i>
                                    </a>
                                </li>
                            @endif
                            @if (site_social_links()->twitter_url)
                                <li class="list-inline-item">
                                    <a href="{{ site_social_links()->twitter_url }}" target="_blank">
                                        <i class="ti-twitter-alt"></i>
                                    </a>
                                </li>
                            @endif
                            @if (site_social_links()->linkedin_url)
                                <li class="list-inline-item">
                                    <a href="{{ site_social_links()->linkedin_url }}" target="_blank">
                                        <i class="ti-linkedin"></i>
                                    </a>
                                </li>
                            @endif
                            @if (site_social_links()->instagram_url)
                                <li class="list-inline-item">
                                    <a href="{{ site_social_links()->instagram_url }}" target="_blank">
                                        <i class="ti-instagram"></i>
                                    </a>
                                </li>
                            @endif
                        </ul>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="content mb-5">
                        <h4>Wir freuen uns auf Ihre Nachricht</h4>
                        <p>Wir freuen uns auf Ihre Nachricht
                            Haben Sie Fragen, Anregungen oder Feedback? Zögern Sie nicht, uns zu kontaktieren. Wir helfen
                            Ihnen gerne weiter und melden uns so schnell wie möglich bei Ihnen.</p>

                        @if (settings()->site_email != '')
                            <h4 class="mt-5">Sie mögen keine Formulare? Schreiben Sie uns direkt per E-Mail</h4>
                            <p><i class="ti-email mr-2 text-primary"></i><a
                                    href="mailto:{{ settings()->site_email }}">{{ settings()->site_email }}</a>
                            </p>
                        @endif
                    </div>
                </div>
                <div class="col-md-6">
                    <form method="POST" action="{{ route('send_email') }}">
                        @csrf
                        <x-form-alerts></x-form-alerts>
                        <div class="form-group">
                            <label for="name"><b class="title-color">Ihr Name</b> (Required):</label>
                            <input type="text" name="name" id="name" class="form-control"
                                value="{{ old('name') }}" placeholder="eg: William Woods" />
                            @error('name')
                                <span class="text-danger ml-1">{{ $message }}</span>
                            @enderror
                        </div>
                        <div class="form-group">
                            <label for="email"> <b class="title-color">Ihre Email Addresse</b> (Required): </label>
                            <input type="email" name="email" id="email" class="form-control"
                                value="{{ old('email') }}" placeholder="eg: williamwoods@example.com" />
                            @error('email')
                                <span class="text-danger ml-1">{{ $message }}</span>
                            @enderror
                        </div>
                        <div class="form-group">
                            <label for="subject"><b class="title-color">Titel</b>: (Required):</label>
                            <input type="text" name="subject" id="subject" class="form-control"
                                value="{{ old('subject') }}" placeholder="eg: Advertising" />
                            @error('subject')
                                <span class="text-danger ml-1">{{ $message }}</span>
                            @enderror
                        </div>
                        <div class="form-group">
                            <label for="message"><b class="title-color">Ihre Nachricht</b>: (Required):</label>
                            <textarea name="message" id="message" class="form-control">{{ old('message') }}</textarea>
                            @error('message')
                                <span class="text-danger ml-1">{{ $message }}</span>
                            @enderror
                        </div>
                        <button type="submit" class="btn btn-primary">Absenden</button>
                    </form>
                </div>
            </div>
        </div>
    </section>
@endsection
