<?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-export" style="overflow: scroll;" >


<form class="h-100 m-0" action="<?php echo esc_html( admin_url( 'admin-ajax.php' ) ); ?>" id="export-form-for-vendor-product" method= 'GET'>

			<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-3 text-center position-relative">
					<div class="fs-5 fw-semi-bold mb-1">Export</div>
					<button class="btn rounded-circle position-absolute top-0 end-0 elex-multi-vendor-for-woocommerce-add-export-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">

						<?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>  
					<?php wp_nonce_field( 'elex_mv_prod_page_nonce', 'nonce' ); ?>
					<input name="action" value="elex_mv_export" hidden >
					<div class="form-group mb-3">
						<label>Stock Status</label>
						<select name="stock" id="stock" class="form-select">
							<?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>Visibility</label>
					<select name="enabled" id="enabled" class="form-select">
					<?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">
						<?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">
					<?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>

					<!-- <div class="form-group mb-3">
						<label>File Format</label>
						<select name="format" id="elex-multi-vendor-for-woocommerce-export-csv-format" class="form-select">
						<?php $format_val = ! empty( filter_input( INPUT_GET, 'format' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) ? sanitize_text_field( filter_input( INPUT_GET, 'format' , FILTER_SANITIZE_FULL_SPECIAL_CHARS ) ) : ''; ?>

							<option value="csv" <?php ( 'csv' === $format_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?> >CSV</option>
							<option value="xlsx" <?php ( 'xlsx' === $format_val ) ? esc_html_e( 'selected' , 'elex-multi-vendor-for-woocommerce' ) : '' ; ?> >Xlsx</option>
						</select>
					</div> -->

	
					<button class="btn btn-primary w-100 elex-export-csv-button-submit" type='button'>Export as CSV</button>
				</div>


			</div>
</form>
</div>

