@extends('layouts.app_admin')
@section('title', 'Blogs')
@push('css')


@endpush

@section('content')

<!-- Main Content -->
<div class="main-content">
    <section class="section">
        <div class="col-12 section-header">
            <div class="col-6">
                <h1>Add</h1>
            </div>
        </div>

        @if ($errors->any())
        <div class="col-sm-12">
            <div class="alert alert-warning alert-dismissible fade show" role="alert">
                @foreach ($errors->all() as $error)
                <span>
                    <p>{{ $error }}</p>
                </span>
                @endforeach
                <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
        </div>
        @endif

        @include('flash-message')

        <div class="section-body">
            <div class="col-12">
                <div class="card">
                    {{-- {{ route('product.store') }} --}}

                    <div class="card-body">
                        <ul class="nav nav-tabs" id="languageTabs">
                            <li class="nav-item">
                                <a class="nav-link active" id="english-tab" data-toggle="tab" href="#english-section">English</a>
                            </li>
                            <li class="nav-item">
                                <a class="nav-link" id="arabic-tab" data-toggle="tab" href="#arabic-section">Arabic</a>
                            </li>
                        </ul>
                        <form method="POST" action="{{ route('blog.store') }}" id="editForm" enctype="multipart/form-data">
                            {{ method_field('POST') }}
                            {{ csrf_field() }}
                            <div class="tab-content">
                                <div class="form-group">
                                    <label for="author_name">Author Name<code>*</code></label>
                                    <input type="text" name="author_name" class="form-control form-control-lg">
                                </div>

                                <div class="form-group">
                                    <label for="image">Image<code>*</code></label>
                                    <input type="file" name="image" class="form-control form-control-lg" />
                                </div>
                                <div class="tab-pane fade show active" id="english-section">
                                    <!-- English form fields -->
                                    <div class="form-group">
                                        <label for="title_en">Title (English)<code>*</code></label>
                                        <input type="text" name="title_en" class="form-control form-control-lg">
                                    </div>

                                    <div class="form-group">
                                        <label for="details_en">Details (English)<code>*</code></label>
                                        <textarea name="ck_editor_text"></textarea>
                                    </div>
                                </div>

                                <div class="tab-pane fade" id="arabic-section">
                                    <!-- Arabic form fields -->
                                    <div class="form-group">
                                        <label for="title_ar">Title (Arabic)<code>*</code></label>
                                        <input type="text" name="title_ar" class="form-control form-control-lg">
                                    </div>

                                    <div class="form-group">
                                        <label for="details_ar">Details (Arabic)<code>*</code></label>
                                        <textarea name="ck_editor_text_ar"></textarea>
                                    </div>
                                </div>
                            </div>

                            <div class="card-footer text-right">
                                <button class="btn btn-primary mr-1" type="submit">Submit</button>
                            </div>

                    </div>
                    </form>

                </div>
            </div>
        </div>
    </section>
</div>




@endsection

@section('extra-js')


@endsection