@extends('layouts.admin.master')
@section('content')
<style>
 .tab {
     display: none
 }
  
 .step {
     height: 15px;
     width: 15px;
     margin: 0 2px;
     background-color: #bbbbbb;
     border: none;
     display: inline-block;
     opacity: 0.5
 }
 .step.active {
     opacity: 1
 }
 .step.finish {
     background-color: #4CAF50
 }
 .all-steps {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px
 }
 .thanks-message {
     display: none
 }
 .checkmark {
     position: absolute;
     top: 0;
     left: 0;
     height: 25px;
     width: 25px;
     background-color: #eee;
     border-radius: 50%
 }

 

 .checkmark:after {
     content: "";
     position: absolute;
     display: none
 }

 
</style>

<div class="container-xxl flex-grow-1 container-p-y">
    <!-- Hoverable Table rows -->
    <div class="card">
        <div class="row">
            <div class="col-xl">
                <div class="card mb-8">
                    <div class="card-header d-flex justify-content-between align-items-center">
                        <h5 class="mb-0">Add Servey</h5>
                        <small class="text-muted float-end"></small>
                    </div>
                    <div class="card-body">
                        <div class="col-md-6">
                        {!! Form::open([
                                'route' => ['servey.template.store',$servey->id],
                                'method' => 'POST',
                                'name' => 'add_servey_template_form',
                                'id' => 'add_servey_template_form',
                                'autocomplete' => 'off',
                                'enctype' => 'multipart/form-data'
                            ])
                        !!}
                                <div class="all-steps" id="all-steps"> <span class="step"></span> <span class="step"></span> <span class="step"></span> <span class="step"></span> </div>
                                    <div class="tab">
                                        <div class="mb-3">
                                            <label class="form-label" for="basic-default-fullname">Question</label>
                                            <textarea name="question" class="form-control" placeholder="Question"></textarea>
                                        </div>
                                        <div class="mb-3">
                                            <label class="form-label" for="basic-default-company">Description</label>
                                            <textarea name="description" class="form-control" placeholder="Description"></textarea>
                                        </div>
                                    </div>
                                    <div class="tab">
                                    <div class="mb-3">
                                        <label class="form-label" for="basic-default-fullname">Choose Question Type</label>
                                        {!! Form::select('question_type', [0 => 'Select Type'] + $question_types, old('question_types', (isset($company->question_types) && $company->question_types) ? $company->question_types : ''), ['class' => 'form-control question_type', 'id' => 'question_type']) !!}
                                    </div>
                                    </div>
                                    <div class="tab">
                                        <div class="question_options_tab" id="question_options_tab"></div>
                                        <div id="ask_feedback_question" style="display:none;">
                                            <div class="mb-3">
                                                <label class="form-label" for="basic-default-company">Positive Question Title</label>
                                                <textarea name="positive_title" class="form-control" placeholder="Positive Question Title"></textarea>
                                            </div>
                                            <div class="mb-3">
                                                <label class="form-label" for="basic-default-company">Select Positive Question</label>
                                                {!! Form::select('postive_questions[]', [0 => 'Select Question'] + $positive_feedback_questions, old('postive_questions', (isset($company->question_types) && $company->question_types) ? $company->question_types : ''), ['class' => 'form-control', 'id' => 'postive_questions']) !!}
                                            </div>
                                            <div class="mb-3">
                                                <label class="form-label" for="basic-default-company">Negative Question Title</label>
                                                <textarea name="negative_title" class="form-control" placeholder="Negative Question Title"></textarea>
                                            </div>
                                            <div class="mb-3">
                                                <label class="form-label" for="basic-default-company">Select Positive Question</label>
                                                {!! Form::select('negative_questions[]', [0 => 'Select Question'] + $negative_feedback_questions, old('negative_questions', (isset($company->question_types) && $company->question_types) ? $company->question_types : ''), ['class' => 'form-control negative_questions', 'id' => 'negative_questions']) !!}
                                            </div>
                                        </div>
                                    </div>
                                    <div class="thanks-message text-center" id="text-message"> <img src="https://i.imgur.com/O18mJ1K.png" width="100" class="mb-4">
                                        <h3>Thanks for your Donation!</h3> <span>Your donation has been entered! We will contact you shortly!</span>
                                    </div>
                                    <div style="overflow:auto;" id="nextprevious">
                                        <div style="float:right;"> 
                                        <!-- <button type="button" id="prevBtn" onclick="nextPrev(-1)">Previous</button> 
                                        <button type="button" id="nextBtn" onclick="nextPrev(1)">Next</button> -->
                                        <button type="button" class="btn btn-primary" id="prevBtn" onclick="nextPrev(-1)">
                                            <span class="tf-icons bx bx-pie-chart-alt"></span>&nbsp; Previous
                                        </button>
                                        <button type="button" class="btn btn-primary" id="nextBtn" onclick="nextPrev(1)">
                                            <span class="tf-icons bx bx-pie-chart-alt"></span>&nbsp; Next
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>    
        </div>
    </div>
</div>
@endsection

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