<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-block mb-5 d-none" data-toggle="modal" id="feedbackFormModalBtn"
        data-target="#feedbackFormModal">
    نظر درباره‌ی کار
</button>

<!-- Modal -->
<div class="modal fade" id="feedbackFormModal" style="padding-right: 0 !important;" tabindex="-1" role="dialog"
     aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header align-items-center"
                 style="align-items: center !important;padding-bottom: 0 !important;padding-top: 0 !important;">
                <h5 class="modal-title" id="exampleModalLongTitle">نظر شما</h5>
                <button type="button" class="close" style="margin: 0 !important;" data-dismiss="modal"
                        aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <form method="post" id="feedbackForm">

                <div class="modal-body">
                    <form class="mt-5 mx-auto col-md-8 d-flex mb-5 flex-wrap align-items-center justify-content-center"
                    >
                        @csrf
                        <p class="text-muted">لطفا نظر خود را درباره خدمت و متخصص مربوطه با دیگران به اشتراک بگذارید
                            :</p>
                        <div class="rateUser stars_rate d-flex">
                            <div class="stars d-flex justify-content-center">
                                <input class="star star-5" id="star-5" type="radio" name="rate" value="1"/>
                                <label class="star star-5" for="star-5"></label>
                                <input class="star star-4" id="star-4" type="radio" name="rate" value="2"/>
                                <label class="star star-4" for="star-4"></label>
                                <input class="star star-3" id="star-3" type="radio" name="rate" value="3" checked/>
                                <label class="star star-3" for="star-3"></label>
                                <input class="star star-2" id="star-2" type="radio" name="rate" value="4"/>
                                <label class="star star-2" for="star-2"></label>
                                <input class="star star-1" id="star-1" type="radio" name="rate" value="5"/>
                                <label class="star star-1" for="star-1"></label>
                            </div>
                        </div>
                        <div class="col-12">
                            <div id="extra_number_tab" class="custom_form">
                                <div class="floating-label">
                                    <input type="text" class="floating-input" id="title" name="name"
                                           placeholder=" " required value="{{auth()->user()->name ?? ' '}}">
                                    <label class="main">نام شما</label>
                                </div>
                            </div>
                        </div>
                        <div id="tab1" class="col-12 custom_form">
                            <div class="floating-label">
                    <textarea type="message" class="floating-input" name="content" placeholder=" "
                              autocomplete="off" cols="4" rows="4" required
                              style="height: unset !important;padding-top: 0.9rem;"></textarea>
                                <label class="main">متن پیام</label>
                            </div>
                        </div>
                        <div class="col-12 d-flex justify-content-end btn_send_contact">
                            <button class="btn px-5 btn-outline-info" type="submit">
                                ارسال پیام
                            </button>
                        </div>
                    </form>
                </div>
        </div>
    </div>
</div>


@if(session()->has('okPaymentFeedback'))
    <!-- Button trigger modal -->
    <button type="button" class="btn btn-primary btn-block mb-5 d-none" data-toggle="modal"
            id="feedbackFormModalPaymentBtn" data-target="#feedbackFormModalPayment">
        نظر درباره‌ی کار
    </button>

    <!-- Modal -->
    <div class="modal fade" id="feedbackFormModalPayment" style="padding-right: 0 !important;" tabindex="-1"
         role="dialog"
         aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header align-items-center"
                     style="align-items: center !important;padding-bottom: 0 !important;padding-top: 0 !important;">
                    <h5 class="modal-title" id="exampleModalLongTitle">نظر شما</h5>
                    <button type="button" class="close" style="margin: 0 !important;" data-dismiss="modal"
                            aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <form method="post" id="feedbackForm"
                      action="{{request()->get('route')}}">

                    <div class="modal-body">
                        <form
                            class="mt-5 mx-auto col-md-8 d-flex mb-5 flex-wrap align-items-center justify-content-center"
                        >
                            @csrf
                            <p class="text-muted">لطفا نظر خود را درباره خدمت و متخصص مربوطه با دیگران به اشتراک بگذارید
                                :</p>
                            <div class="rateUser stars_rate d-flex">
                                <div class="stars d-flex justify-content-center">
                                    <input class="star star-5" id="star-5" type="radio" name="rate" value="1"/>
                                    <label class="star star-5" for="star-5"></label>
                                    <input class="star star-4" id="star-4" type="radio" name="rate" value="2"/>
                                    <label class="star star-4" for="star-4"></label>
                                    <input class="star star-3" id="star-3" type="radio" name="rate" value="3" checked/>
                                    <label class="star star-3" for="star-3"></label>
                                    <input class="star star-2" id="star-2" type="radio" name="rate" value="4"/>
                                    <label class="star star-2" for="star-2"></label>
                                    <input class="star star-1" id="star-1" type="radio" name="rate" value="5"/>
                                    <label class="star star-1" for="star-1"></label>
                                </div>
                            </div>
                            <div class="col-12">
                                <div id="extra_number_tab" class="custom_form">
                                    <div class="floating-label">
                                        <input type="text" class="floating-input" id="title" name="name"
                                               placeholder=" " required value="{{auth()->user()->name ?? ' '}}">
                                        <label class="main">نام شما</label>
                                    </div>
                                </div>
                            </div>
                            <div id="tab1" class="col-12 custom_form">
                                <div class="floating-label">
                    <textarea type="message" class="floating-input" name="content" placeholder=" "
                              autocomplete="off" cols="4" rows="4" required
                              style="height: unset !important;padding-top: 0.9rem;"></textarea>
                                    <label class="main">متن پیام</label>
                                </div>
                            </div>
                            <div class="col-12 d-flex justify-content-end btn_send_contact">
                                <button class="btn px-5 btn-outline-info" type="submit">
                                    ارسال پیام
                                </button>
                            </div>
                        </form>
                    </div>
            </div>
        </div>
    </div>
    <input type="hidden" id="openFeedBackModal" value="ok">
@endif
