@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">Polls / Create</li></ul></div>
    <div class="col-md-12"><div class="page-header-title"><h2 class="mb-0">{{ __('Create Poll') }}</h2></div></div>
</div></div></div>

@include('includes.admin.form-both')

<form id="geniusformdata" action="{{ route('addPolls.store')}}" method="POST" enctype="multipart/form-data">
    {{csrf_field()}}
    <div class="card">
        <div class="card-header"><h5>{{ __('Poll 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" class="form-control">
                        <option value="">{{__('Please Select a Language')}}</option>
                        @foreach ($datas as $data)
                            <option value="{{$data->id}}">{{$data->language}}</option>
                        @endforeach
                    </select>
                </div>
                <div class="col-md-6 mb-3">
                    <label class="form-label">{{ __('End Date') }}</label>
                    <input id="from" class="form-control" type="text" name="end_date" autocomplete="off" placeholder="{{__('End Date')}}">
                </div>
                <div class="col-12 mb-3">
                    <label class="form-label">{{ __('Question') }} <span class="text-danger">*</span></label>
                    <textarea name="question" class="form-control" rows="3" placeholder="{{ __('Question') }}"></textarea>
                </div>
            </div>
            <div class="pollOption">
                <div class="mb-3">
                    <label class="form-label">{{ __('Poll Option') }} <span class="text-danger">*</span></label>
                    <input type="text" name="poll_option[]" class="form-control" placeholder="{{ __('Poll Option') }}" autocomplete="off">
                </div>
            </div>
            <div class="mb-3">
                <a href="javascript:;" id="poll-option" class="btn btn-sm btn-dark"><i class="ti ti-plus"></i> {{__('Add More Option')}}</a>
            </div>
            <div class="mb-3">
                <label class="form-label">{{__('Status')}} <span class="text-danger">*</span></label>
                <div>
                    <div class="form-check form-check-inline">
                        <input class="form-check-input" type="radio" name="status" value="1" id="enable">
                        <label class="form-check-label" for="enable">{{__('Enable')}}</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input class="form-check-input" type="radio" name="status" id="disable" value="0" checked>
                        <label class="form-check-label" for="disable">{{__('Disable')}}</label>
                    </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>{{ __('Create Poll') }}</button>
    </div></div>
</form>
@endsection
@section('scripts')
<script src="{{asset('assets/admin/js/poll.js')}}"></script>
@endsection
