@extends('admin.layouts.container')

@section('content')
<div class="side-title">
    <h3>{{ $head ?? '' }}</h3>
</div>

<div class="border-item">
    <form class="form-row" method="post" action="{{ $action }}">
        @if($contact ?? ''  && $contact->id)
            @method('PUT')
        @endif
        @CSRF

             <div class="form-group col-lg-6">
            <label>{{ meta('email', getCurrentLocale()) ?? __('contacts.email') }} </label>
            <input type="text" class="form-control {{ $errors->has('email') ? 'is-invalid' : '' }}" name="email" placeholder="{{ meta('email', getCurrentLocale()) ??__('contacts.email') }}" disabled value='{{ old("email", $contact->email ?? "") }}'/>
        </div>
             <div class="form-group col-lg-6">
            <label>{{ meta('phone', getCurrentLocale()) ?? __('contacts.phone') }} </label>
            <input type="text" class="form-control {{ $errors->has('phone') ? 'is-invalid' : '' }}" name="phone" placeholder="{{ meta('phone', getCurrentLocale()) ??__('contacts.phone') }}" disabled value='{{ old("phone", $contact->phone ?? "") }}'/>
        </div>
        
             <div class="form-group col-lg-6">
            <label>{{ meta('subject', getCurrentLocale()) ?? __('contacts.subject') }} </label>
            <input type="text" class="form-control {{ $errors->has('subject') ? 'is-invalid' : '' }}" name="subject" placeholder="{{ meta('subject', getCurrentLocale()) ??__('contacts.subject') }}" disabled value='{{ old("subject", $contact->subject ?? "") }}'/>
        </div>
        
             <div class="form-group col-lg-6">
            <label>{{ meta('message', getCurrentLocale()) ?? __('contacts.message') }} </label>
            <textarea type="text" class="form-control {{ $errors->has('message') ? 'is-invalid' : '' }}" name="message" placeholder="{{ meta('message', getCurrentLocale()) ??__('contacts.message') }}" disabled >{{ old("message", $contact->message ?? "") }}</textarea>
        </div>
      


       
    </form>
</div>

@endsection

@section('inner_js')

    <!-- Editor JS files -->
{{--    <script src="{{ asset('/assets/admin/js/lib/tinymce.min.js') }}"></script>--}}
            <script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
    <script>
        let route_prefix = "{{ url(config('lfm.prefix')) }}",
            url = "{{url('/')}}/",
            url_answer = "{{url('/')}}/admin/answerdata",
            url_question = "{{url('/')}}/admin/questiondata",
            imagePath = "{{asset('')}}";
    </script>
    <script src="{{ asset('assets/admin/js/editor.js') }}"></script>
    <script src="{{ asset('assets/admin/js/lfm.js') }}"></script>
@endsection
