<?php if ( ! defined( 'ABSPATH' ) ) {
exit;} ?>
<div class="bg-dark bg-opacity-25 elex-multi-vendor-for-woocommerce-popup row justify-content-end" id="elex-multi-vendor-for-woocommerce-add-filter" style="overflow: scroll;" >

<form action = '#'   method= 'GET' class="h-100 m-0">
				<input  name="menu_tab" hidden value="product" class="form-control">

			<div class="col-lg-6 col-md-8 col-12 bg-white h-100 ms-auto overflow-auto">
				<div class="py-2 px-4 mt-5 position-relative">
					<div class="fs-5 text-center fw-semi-bold mb-1">Advance Filter</di>
					<button class="btn rounded-circle position-absolute top-0 end-0 elex-multi-vendor-for-woocommerce-add-filter-close-btn" type="button">
						<i class="fa-solid fa-xmark"></i>
					</button>
				</div>
				<div class="px-md-5 px-2 py-3">
					<div class="form-group mb-3">
						<label>Product Status</label>
						<select name="status" id="status" class="form-select elex_simple_select_filter">
						<?php $status_val = ! empty( filter_input( INPUT_GET, 'status' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) ? sanitize_text_field( filter_input( INPUT_GET, 'status' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) : ''; ?>
							<option value="">All</option>
							<option value="publish"  <?php ( 'publish' === $status_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?>  >Approved</option>
							<option value="pending" <?php ( 'pending' === $status_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?> >Pending</option>
							<option value="reject" <?php ( 'reject' === $status_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?> >Rejected</option>
							<option value="draft" <?php ( 'draft' === $status_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?> >Draft</option>
						</select>
					</div> 
					<input type="text" name="elex-advance-filter" value="yes" hidden>       
					<?php wp_nonce_field( 'elex_mv_prod_page_nonce', 'nonce' ); ?> 
		   
					<div class="form-group mb-3">
						<label>Stock Status</label>
						<select name="stock" id="stock" class="form-select elex_simple_select_filter">
						<?php $stock_val = ! empty( filter_input( INPUT_GET, 'stock' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) ? sanitize_text_field( filter_input( INPUT_GET, 'stock' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) : ''; ?>
							<option value="">All</option>
							<option value="low"  <?php ( 'low' === $stock_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?> >Low Stock</option>
							<option value="in">In Stock</option>
							<option value="out" <?php ( 'out' === $stock_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?>  >Out Of Stock</option>
							<option value="onbackorder" <?php ( 'onbackorder' === $stock_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?>  >On Backorder</option>
						</select>
					</div>
					<div class="form-group mb-3">
					<label>Enabled</label>
					<select name="enabled" id="enabled" class="form-select elex_simple_select_filter">
					<?php $enable_val = ! empty( filter_input( INPUT_GET, 'enabled' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) ? sanitize_text_field( filter_input( INPUT_GET, 'enabled' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) : ''; ?>
						<option value="">All</option>
						<option value="visible"  <?php ( 'visible' === $enable_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?> >Enabled</option>
						<option value="hidden" <?php ( 'hidden' === $enable_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?> >Disabled</option>
					</select>
					</div>
					<div class = "">
					<div class="form-group mb-3 ">
						<label>Sort By</label>
						<select name="sort_by" id="sort_by" class="form-select elex_simple_select_filter">
						<?php $sort_by_val = ! empty( filter_input( INPUT_GET, 'sort_by' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) ? sanitize_text_field( filter_input( INPUT_GET, 'sort_by' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) : ''; ?>

							<option value="">All</option>
							<option value="sold" <?php ( 'sold' === $sort_by_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?> >Sold</option>
							<option value="view" <?php ( 'view' === $sort_by_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?> >Views</option>
							</select>
					</div>

					<div class="form-group mb-3 ">
					<label>Order By</label>
					<select name="order_by" id="order_by" class="form-select elex_simple_select_filter">
					<?php $order_by_val = ! empty( filter_input( INPUT_GET, 'order_by' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) ? sanitize_text_field( filter_input( INPUT_GET, 'order_by' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) : ''; ?>

						<option value="">All</option>
						<option value="asc" <?php ( 'asc' === $order_by_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?> >Ascending</option>
						<option value="desc" <?php ( 'desc' === $order_by_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?>  >Descending</option>
						</select>
					</div>
					</div>

				
					<button id="elex-multi-vendor-for-woocommerce-advanced-filter-submit-button" class="btn btn-primary w-100" type="submit">Apply Filters</button>
				</div>
			</div>
</form>

</div>

</div>
