@extends('layouts.load')

@section('content')

<div class="card shadow-none border-0 mb-0">
    <div class="card-body p-3">
        @include('includes.admin.form-success')
        @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="geniusformdataedit" action="{{ route('widget.update',$data->id)}}" 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="language_id" class="form-select">
                    <option value="">{{__('Please Select a Language')}}</option>
                    @foreach ($languages as $language)
                        <option value="{{$language->id}}" {{$data->language_id == $language->id ? 'selected' : ''}}>{{$language->language}}</option>
                    @endforeach
                </select>
            </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="{{ __('Enter Title') }}" id="title" autocomplete="off" value="{{ $data->title}}">
                <small class="text-muted">{{ __('(In Any Language)') }}</small>
            </div>

            <div class="mb-3">
                <label class="form-label">{{__('Description')}} <span class="text-danger">*</span></label>
                <textarea class="nic-edit" name="description" placeholder="{{__('Description')}}" id="description">{{ $data->description}}</textarea>
            </div>

            <div class="mb-3">
                <label class="form-label d-block">{{__('Visibility')}} <span class="text-danger">*</span></label>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="status" value="1" id="visible" {{$data->status == 1 ? 'checked':''}}>
                    <label class="form-check-label" for="visible">{{__('visible')}}</label>
                </div>
                <div class="form-check form-check-inline">
                    <input class="form-check-input" type="radio" name="status" value="0" id="invisible" {{$data->status == 0 ? 'checked':''}}>
                    <label class="form-check-label" for="invisible">{{__('invisible')}}</label>
                </div>
            </div>

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

@endsection

@section('scripts')
@endsection