<?php if ( ! defined( 'ABSPATH' ) ) {
exit;} ?>
					<div class="row justify-content-center">

						<div class="col-xl-6 col-lg-8 col-md-10  py-2 pt-5">
							<div class="shadow-sm rounded py-3 px-4">
								<h4 class="mb-4"><?php echo esc_html__( 'Payment Settlement', 'elex-multi-vendor-for-woocommerce' ); ?></h4>

								<div class="mb-3">
									<p class="mb-2"><?php echo esc_html__( 'Who Will Bear the shipping Fee By Default', 'elex-multi-vendor-for-woocommerce' ); ?></p>
									<div class="d-flex gap-3">
										<div class="form-check">
											<input class="form-check-input " type="radio" name="elex-multi-vendor-for-woocommerce-shipfee-radios"
												id="elex-multi-vendor-for-woocommerce-shipfee-radio1" value="vendor" 
												<?php 
												if ( 'vendor' === $site_settings->get( 'ship_fee' ) ) {
													echo esc_html( 'checked' );
												} 
												?>
												>
											<label class="form-check-label mb-0" for="elex-multi-vendor-for-woocommerce-shipfee-radio1">
											<?php echo esc_html__( 'Vendor', 'elex-multi-vendor-for-woocommerce' ); ?> 
											</label>
										</div>
										<div class="form-check">
											<input class="form-check-input" type="radio" name="elex-multi-vendor-for-woocommerce-shipfee-radios"
												id="elex-multi-vendor-for-woocommerce-shipfee-radio2" value="admin" 
												<?php 
												if ( 'admin' === $site_settings->get( 'ship_fee' ) ) {
													echo esc_html( 'checked' );
												} 
												?>
												>
											<label class="form-check-label mb-0" for="elex-multi-vendor-for-woocommerce-shipfee-radio2">
											<?php echo esc_html__( 'Admin', 'elex-multi-vendor-for-woocommerce' ); ?> 
											</label>
										</div>
									</div>
								</div>

							

								<div class="mb-5">
									<p class="mb-1"><?php echo esc_html__( 'Default Admin Commission for Each Sale (%)', 'elex-multi-vendor-for-woocommerce' ); ?></p>
									<div class="input-group input-group-sm ">
										<input type="number" step="0.01" min="0" class="form-control" aria-label="Text input with checkbox" id="commission_for_each_sale" name="commission_for_each_sale" value="<?php echo ! empty( $site_settings->get( 'commission_for_each_sale' ) ) || $site_settings->get( 'commission_for_each_sale' ) !== 0 ? esc_html( $site_settings->get( 'commission_for_each_sale' ) ) : 10; ?>">
										<!-- <select id="commission_type_of_sale" name="commission_type_of_sale" class="input-group-text  bg-info bg-opacity-10 pe-4">
											<option value="percent"><?php echo esc_html__( 'Percentage', 'elex-multi-vendor-for-woocommerce' ); ?></option>
											<option value="fixed"><?php echo esc_html__( 'Fixed Amount', 'elex-multi-vendor-for-woocommerce' ); ?></option>

										</select> -->
									</div>
									<div id="commission_for_each_sale_error"></div>

								</div>

								<!-- <div class="row align-items-center mb-3">
									<div class="col-md-7">
										<p class="mb-0">Include Shipping Cost in Commission</p>
									</div>
									<div class="col-md-5">
										<label class="elex-enable-disable-switch">
											<input type="checkbox" checked="" id="include_shipping_cost_in_commission" name="include_shipping_cost_in_commission">
											<div class="switch round"></div>
										</label>
									</div>

								</div> -->
								
								<div class="mb-3">
									<p class="mb-2"><?php echo esc_html__( 'Default Settlement Date With Vendors', 'elex-multi-vendor-for-woocommerce' ); ?></p>
									<div class="input-group input-group-sm ">
										<input type="number" class="form-control" value="<?php echo esc_html( $site_settings->get( 'elex_mv_date_of_month_pay_settle' ) ); ?>" name="elex_mv_date_of_month_pay_settle" id="elex_mv_date_of_month_pay_settle">
										<span class="input-group-text bg-primary text-white px-4"><?php echo esc_html__( 'Of Every Month', 'elex-multi-vendor-for-woocommerce' ); ?></span>
									</div>
									<div id="elex_mv_date_of_month_pay_settle-error"></div>
								</div>


								<div class="mb-3">
									<p class="mb-2"><?php echo esc_html__( 'Order Status To Be Considered For Settlement', 'elex-multi-vendor-for-woocommerce' ); ?></p>
									<div class="d-flex gap-3">
									<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 = ! empty( $site_settings->get( 'elex_mv_order_status_radios' ) ) ? $site_settings->get( 'elex_mv_order_status_radios' ) : array();
										foreach ( $order_statuses as $orderstatus => $label ) {
											$selected = in_array( $orderstatus, $selected_statuses ) ? 'selected' : '';
											echo '<option value="' . esc_attr( $orderstatus ) . '" ' . esc_attr( $selected ) . '>' . esc_html( $label ) . '</option>';
										}
										?>
									</select>
									</div>
									<div id="elex_mv_order_status_radios-error"></div>

								</div>



								<div class="d-flex gap-2">
								<button class="btn btn-default flex-fill btn-outline-primary elex-multi-vendor-for-woocommerce-onboard-back-btn"  data-id="3" type="button">
									<?php echo esc_html__( '< Back', 'elex-multi-vendor-for-woocommerce' ); ?></button>

									<button class="btn btn-primary flex-fill elex-multi-vendor-for-woocommerce-confirm-admin-setup-btn"  data-id="3" type="button">
									<?php echo esc_html__( 'Confirm', 'elex-multi-vendor-for-woocommerce' ); ?></button>
								
								</div>
								
							</div>
						</div>
					</div>

					