@extends('layouts.admin')

@section('content')

<!-- [ breadcrumb ] start -->
<div class="page-header">
    <div class="page-block">
        <div class="row align-items-center">
            <div class="col-md-12">
                <ul class="breadcrumb">
                    <li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">হোম</a></li>
                    <li class="breadcrumb-item"><a href="javascript: void(0)">মিডিয়া</a></li>
                    <li class="breadcrumb-item" aria-current="page">Gallery / Create</li>
                </ul>
            </div>
            <div class="col-md-12">
                <div class="page-header-title">
                    <h2 class="mb-0">Gallery / Create</h2>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- [ breadcrumb ] end -->

<div class="card">
    <div class="card-body">
        @include('includes.admin.form-error')
        @include('includes.admin.form-success')
        <div class="row justify-content-center">
            <div class="col-lg-8">
                <div class="gocover" style="background: url({{asset('assets/images/'.$gs->admin_loader)}}) no-repeat scroll center center rgba(45, 45, 45, 0.5);"></div>
                <form id="geniusformdata" action="{{ route('image.gallery.store')}}" method="POST" enctype="multipart/form-data">
                    {{csrf_field()}}

                    <div class="mb-3">
                        <label class="form-label">{{ __('Language') }} <span class="text-danger">*</span></label>
                        <select name="language_id" id="album_language_id" class="form-select">
                            <option value="">{{__('Please Select a Language')}}</option>
                            @foreach ($languages as $language)
                                <option value="{{$language->id}}">{{$language->language}}</option>
                            @endforeach
                        </select>
                    </div>

                    <div class="mb-3">
                        <label class="form-label">{{ __('Album') }} <span class="text-danger">*</span></label>
                        <select name="image_album_id" id="image_album_id" class="form-select">
                            <option value="">{{__('Please Select Your Album')}}</option>
                        </select>
                    </div>

                    <div class="mb-3">
                        <label class="form-label">{{ __('Category') }} <span class="text-danger">*</span></label>
                        <select name="image_category_id" id="image_category_id" class="form-select">
                            <option value="">{{__('Please Select Your Category')}}</option>
                        </select>
                    </div>

                    <div class="mb-3">
                        <label class="form-label">{{__('Gallery Images')}} <span class="text-danger">*</span></label>
                        <a href="#" class="set-gallery btn btn-outline-primary btn-sm" data-toggle="modal" data-target="#setgallery">
                            <i class="icofont-plus"></i> {{__('Make Gallery')}}
                        </a>
                        <input type="file" name="gallery[]" class="hidden" id="uploadgallery" accept="image/*" multiple>
                    </div>

                    <button class="btn btn-primary" type="submit">{{ __('Create Image Gallery') }}</button>
                </form>

                <div class="modal fade" id="setgallery" tabindex="-1" role="dialog" aria-labelledby="setgallery" aria-hidden="true">
                    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title" id="exampleModalCenterTitle">{{ __('Image Gallery') }}</h5>
                                <button type="button" class="close" data-bs-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">×</span>
                                </button>
                            </div>
                            <div class="modal-body">
                                <div class="top-area">
                                    <div class="row">
                                        <div class="col-sm-6 text-right">
                                            <div class="upload-img-btn">
                                                <label id="prod_gallery"><i class="icofont-upload-alt"></i>{{ __('Upload File') }}</label>
                                            </div>
                                        </div>
                                        <div class="col-sm-6">
                                            <a href="javascript:;" class="upload-done" data-bs-dismiss="modal"> <i class="fas fa-check"></i> {{ __('Done') }}</a>
                                        </div>
                                        <div class="col-sm-12 text-center">( <small>{{ __('You can upload multiple Images.') }}</small> )</div>
                                    </div>
                                </div>
                                <div class="gallery-images">
                                    <div class="selected-image">
                                        <div class="row">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@endsection

@section('scripts')
<script src="{{asset('assets/admin/js/image_gallary_front.js')}}"></script>
@endsection
