@extends('layouts.admin')
@section('content')
<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">RSS / Create</li></ul></div>
    <div class="col-md-12"><div class="page-header-title"><h2 class="mb-0">{{ __('Import RSS Feed') }}</h2></div></div>
</div></div></div>

@include('includes.admin.form-error')
@include('includes.admin.form-success')

<form id="geniusformdata" action="{{ route('rss.store')}}" method="POST" enctype="multipart/form-data">
    {{csrf_field()}}
    <div class="card">
        <div class="card-header"><h5>{{ __('RSS Feed Details') }}</h5></div>
        <div class="card-body">
            <div class="row">
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('Language') }} <span class="text-danger">*</span></label>
                    <select name="language_id" id="rss_language_id" class="form-control">
                        <option value="">{{__('Please Select a Language')}}</option>
                        @foreach ($languages as $language)
                        <option value="{{$language->id}}">{{$language->language}}</option>
                        @endforeach
                    </select>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('Category') }} <span class="text-danger">*</span></label>
                    <select name="category_id" id="category_id" class="form-control">
                        <option value="">{{__('Please Select a Category')}}</option>
                    </select>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('Feed Name') }} <span class="text-danger">*</span></label>
                    <input type="text" name="feed_name" id="feed_name" class="form-control" placeholder="{{ __('Feed Name') }}">
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('Feed URL') }} <span class="text-danger">*</span></label>
                    <input type="text" name="feed_url" id="feed_url" class="form-control" placeholder="{{ __('Feed Url') }}">
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('Number of Posts to Import') }} <span class="text-danger">*</span></label>
                    <input type="number" name="post_limit" id="post_limit" class="form-control" placeholder="{{__('Number of Posts to Import')}}">
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{__('Auto Update')}} <span class="text-danger">*</span></label>
                    <div class="mt-2">
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="auto_update" id="auto_update1" value="1">
                            <label class="form-check-label" for="auto_update1">{{__('Yes')}}</label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input" type="radio" name="auto_update" id="auto_update0" value="0" checked>
                            <label class="form-check-label" for="auto_update0">{{__('No')}}</label>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="card"><div class="card-body">
        <button class="btn btn-primary" type="submit"><i class="ti ti-device-floppy me-1"></i>{{ __('Import Rss Feed') }}</button>
    </div></div>
</form>
@endsection
@section('scripts')
<script src="{{asset('assets/admin/js/rss.js')}}"></script>
@endsection
