@extends('layouts.load')

@section('content')

<div class="card shadow-none border-0 mb-0">
    <div class="card-body p-3">
        @include('includes.admin.form-error')
        <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('subcategories.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="article_language_id" class="form-select">
                    <option value="">{{__('Please Select Your Language')}}</option>
                    @foreach ($datas as $data)
                        <option value="{{$data->id}}">{{$data->language}}</option>
                    @endforeach
                </select>
            </div>

            <div class="mb-3">
                <label class="form-label">{{ __('Parent Category') }} <span class="text-danger">*</span></label>
                <select name="parent_id" id="article_parent_id" class="form-select">
                    <option value="">{{__('Please select a category')}}</option>
                </select>
                <small class="text-muted">{{ __('In English') }}</small>
            </div>

            <div class="mb-3">
                <label class="form-label">{{ __('Title') }} <span class="text-danger">*</span></label>
                <input type="text" class="form-control" name="title" placeholder="{{ __('Title') }}">
                <small class="text-muted">{{ __('(In Any Language)') }}</small>
            </div>

            <input type="hidden" class="form-control" name="slug" placeholder="{{ __('Slug') }}">

            <div class="mb-3">
                <label class="form-label d-block">{{ __('Show At Menu') }} <span class="text-danger">*</span></label>
                <div class="form-check form-check-inline">
                    <input type="radio" class="form-check-input" id="yes" name="show_on_menu" value="1">
                    <label class="form-check-label" for="yes">{{__('Yes')}}</label>
                </div>
                <div class="form-check form-check-inline">
                    <input type="radio" class="form-check-input" id="no" name="show_on_menu" value="0" checked>
                    <label class="form-check-label" for="no">{{__('No')}}</label>
                </div>
            </div>

            <button class="btn btn-primary w-100" type="submit">{{ __('Create Sub Category') }}</button>
        </form>
    </div>
</div>

@endsection

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