<?php if ( ! defined( 'ABSPATH' ) ) {
exit;} ?>
	<div class="elex-multi-vendor-for-woocommerce-wrap elex-multi-vendor-for-woocommerce-wrap-admin overflow-hidden d-flex">

		

		<!-- ======================main content============ -->
		<div class="elex-multi-vendor-for-woocommerce-main ps-2 flex-1">
			<!-- ===========side panel open button========= -->
			<div class="d-flex mb-3 gap-4 align-items-center elex-multi-vendor-for-woocommerce-side-panel-open-div d-md-none">
				<!-- side panel open button -->
				<button class=" btn p-1 shadow-none fs-5   bg-white text-primary position-relative " id="elex-multi-vendor-for-woocommerce-side-panel-open-btn"><svg height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"/></svg></button>
				<h5 class="m-0 ">Payments</h5>
			</div>
			<div>
			 


				<div class=" p-3 ">
				<form method="post">
				<?php wp_nonce_field( 'elex_mv_save_settings', 'elex_mv_settings_nonce' ); ?>
					<div class="row mb-3">
						<div class="col-xl-12 ">
							<p class="mb-1">Default Settlement Date With Vendors</p>
						<div class="row align-items-center">
							<div class="col-xl-4 col-md-6">
							<div class=" input-group  ">
								<input type="number" max="28" min="1" class="form-control" placeholder="1" name="elex_mv_date_of_month_pay_settle" id="elex_mv_date_of_month_pay_settle" aria-label="Text input with checkbox" value="<?php echo esc_attr( $elex_mv_options->elex_mv_date_of_month_pay_settle ); ?>">
								<span class="input-group-text input-group-text-150 bg-info bg-opacity-10">Of Every Month</span>
							</div>
							</div>
							
							<div class="col">
							<small class="text-secondary">The ELEX Multi-Vendor Plugin does not provide an automatic settlement option</small>
							</div>

						</div>
						
						


					</div>
					<div id="elex_mv_date_of_month_pay_settle-error"></div>
					</div>
					

					<div class="row mb-3">
						<div class="col-xl-4 col-md-6">
							<p class="mb-1">Buffer Time For Settlement With Vendors</p>
						<div class="input-group  ">
							<input type="number" class="form-control" id="buffer_time" placeholder="0" name="buffer_time" aria-label="Text input with checkbox" value="<?php echo esc_attr( $elex_mv_options->buffer_time ); ?>">
							<span class="input-group-text input-group-text-150  bg-info bg-opacity-10">Days</span>
						</div>
						</div>
						
					</div>

				   

					<div class="mb-5">
						<p class="mb-2">Order Status To Be Considered For Settlement</p>
						<div class="d-flex gap-3" style="width:35%">
						<select name="elex_mv_order_status_radios[]" id="elex_mv_order_status_radios" multiple  class="choosen-select order-status-selection">
							<?php
							$default_statuses   = wc_get_order_statuses();
							$statuses_to_remove = array(
								'wc-pending',
								'wc-refunded',
								'wc-checkout-draft',
								'wc-failed',
							);
						
							// Remove the specified statuses
							foreach ( $statuses_to_remove as $orderstatus ) {
								unset( $default_statuses[ $orderstatus ] );
							}
							// Get custom order statuses
							$custom_statuses = get_option( 'wc_custom_statuses', array() );
							// Merge default and custom statuses into one array
							$order_statuses = array_merge( $default_statuses, $custom_statuses );
							// Selected default statuses
							$selected_statuses = isset( $elex_mv_options->attributes['elex_mv_order_status_radios'] ) ? $elex_mv_options->attributes['elex_mv_order_status_radios'] : array();
							foreach ( $order_statuses as $orderstatus => $label ) {
								$selected = in_array( $orderstatus, $selected_statuses, true ) ? 'selected' : '';
								echo '<option value="' . esc_attr( $orderstatus ) . '" ' . esc_attr( $selected ) . '>' . esc_attr( $label ) . '</option>';
							}
							?>
						</select>
						</div>
						<div id="elex_mv_order_status_radios-error"></div>
					</div>

					

					<div class="my-4">
						<button type="submit" name="submit" id="submit" class="btn btn-sm btn-primary" value=""><?php echo esc_attr__( 'Save Changes', 'elex-multi-vendor-for-woocommerce' ); ?></button>
					</div>


				</form>
				</div>









			</div>




			<!-----------------------------===============popup=========--------------------->











		</div>







	</div>




	



