<?php
/**
 * Load admin view for Feedback Pop Up.
 *
 * @package miniorange-sms-order-notification-otp-verification/views
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

echo '
            <div class="mowc_deactivation_popup_container" id="mowc_support_form"  style="display: none;" >
                <div id="mowc_deactivation_popup_wrapper" class="mowc_deactivation_popup_wrapper" tabindex="-1" role="dialog" style="display: none;" >
                            <div class="mowc-header" >
                                <h4 class="font-bold grow" >' . esc_html( mowc_( 'Feedback' ) ) . '</h4>
                                <a class ="mowc-button secondary" id="mowc_feedback_cancel_btn" href="#" onclick="mowc_otp_feedback_goback()">' . esc_html( mowc_( 'Go Back' ) ) . '</a>
                              
                            </div>
                            <form class="p-mowc-6 flex flex-col gap-mowc-6" id="mowc_otp_feedback_form" name="f" method="post" action="">
                                    <div class="deactivation_message">' . wp_kses_post( $mowc_message ) . '</div>
                                    <div class="flex flex-col gap-mowc-3">';

foreach ( $mowc_deactivationreasons as $mowc_code => $mowc_name ) {
	echo '
                                                    <label class="mowc-checkbox-container flex">
                                                      <input  type="checkbox" name="reason[]" id="dropdownEnable" value="' . esc_attr( $mowc_code ) . '" class="sr-only"/>
                                                      <div class="mowc-checkmark"></div>
                                                      <p class="text-base font-normal">' . esc_html( $mowc_name ) . '</p>
                                                    </label> 
                                                ';
}
echo '                                  
                                    </div>
                                        <input type="hidden" name="option" value="mowc_otp_feedback_option"/>
                                        <input type="hidden" value="false" id="wc_feedback_type" name="plugin_deactivated"/>';

										wp_nonce_field( $mowc_nonce );

echo '                                   <textarea id="query_feedback"
                                                    class="mowc-textarea"
                                                    name="query_feedback" 
                                                    style="width:100%" 
                                                    rows="4" 
                                                    placeholder="' . esc_attr( mowc_( 'Type your feedback here' ) ) . '"></textarea>
                                        <div class="mowc_otp_note" hidden id="feedback_message" style="padding:10px;color:darkred;"></div>
                                        <textarea hidden id="feedback" name="feedback" style="width:100%" rows="2" placeholder="' . esc_attr( mowc_( 'Type your feedback here' ) ) . '"></textarea>
        ';
echo '                           <div class="mowc_customer_validation-modal-footer" >    
                                    <input type="submit" name="miniorange_wc_feedback_submit" class="mowc-button primary"  style="float: right;"
                                        data-sm="' . esc_attr( $mowc_submit_and_deactivate_message ) . '" data-sm2="' . esc_attr( $mowc_submit_message ) . '" value="' . esc_attr( $mowc_submit_and_deactivate_message ) . '" />';
echo '                                        
                                </div>
                            </form>    
                        
                </div>
            </div>
       ';
