<?php if ( ! defined( 'ABSPATH' ) ) {
exit;} ?>


	<div class="elex-multi-vendor-for-woocommerce-wrap elex-multi-vendor-for-woocommerce-wrap-admin overflow-hidden d-flex position-relative" style="background-color:white;">
		<!-- ===================side panel============ -->
		
<?php
$admin_product_page_nonce = wp_create_nonce( 'admin_product_page_nonce' );
$search_term = $GET_search_term;
?>

		<!-- side panel open button -->
		<!-- <button class="btn btn-outline-primary bg-white text-primary rounded-circle position-absolute shadow mt-3 ms-3" id="elex-multi-vendor-for-woocommerce-side-panel-open-btn"><i class="fa-solid fa-bars"></i></button> -->

		<!--================end of side panel============= -->


		<!-- main-content -->
		<div class="elex-multi-vendor-for-woocommerce-main p-2 flex-1  pe-4">

		<img class="w-100 mb-2" src="<?php echo esc_url( ELEX_MULTI_VENDOR_MAIN_URL_PATH . 'images/top-banner.png' ); ?>" alt="">

			<!-- main content top link and search -->
			<div class="d-flex justify-content-between align-items-center mb-3">
					<h5 class="mb-0 ">Vendor Products</h5>

				<div class="toast p-2 position-fixed top-0 start-50 translate-middle-x bg-white mt-4" id="elex_msging_for_bulk_action">
					<div class="toast-header border-0 ">
						<strong class="me-auto">
							<svg xmlns="http://www.w3.org/2000/svg" width="22.415" height="22.026" viewBox="0 0 22.415 22.026" class="me-2">
								<g id="Icon_feather-check-circle" data-name="Icon feather-check-circle" transform="translate(-1.998 -1.979)">
									<path id="Path_646" data-name="Path 646" d="M23,12.076V13a10,10,0,1,1-5.93-9.139" fill="none" stroke="#28a745" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
									<path id="Path_647" data-name="Path 647" d="M26.5,6l-10,10.009-3-3" transform="translate(-3.5 -1.003)" fill="none" stroke="#28a745" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
								</g>
								</svg>
							<span id = 'elex_msging_for_bulk_action_msg'>Status changed successfully</span></strong>
						<button type="button" class="btn-close" data-bs-dismiss="toast"></button>
					</div> 
				</div>

				<div class="toast p-3 position-fixed top-0 start-50 translate-middle-x bg-white mt-3" id="elex_popup_vendor_prod_reject_item_toast" style="min-width: 450px;">
					<div class="toast-header border-0 border-bottom p-0 pb-2">
						<strong class="mx-auto">
							<svg xmlns="http://www.w3.org/2000/svg" width="18" height="20" viewBox="0 0 20 22" class="me-2">
								<g id="Icon_feather-trash-2" data-name="Icon feather-trash-2" transform="translate(-3.5 -2)">
									<path id="Path_648" data-name="Path 648" d="M4.5,9h18" transform="translate(0 -2)" fill="none" stroke="#dc3545" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
									<path id="Path_649" data-name="Path 649" d="M21.5,7V21a2,2,0,0,1-2,2H9.5a2,2,0,0,1-2-2V7m3,0V5a2,2,0,0,1,2-2h4a2,2,0,0,1,2,2V7" transform="translate(-1 0)" fill="none" stroke="#dc3545" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
									<path id="Path_650" data-name="Path 650" d="M15,16.5v6" transform="translate(-3.5 -4.5)" fill="none" stroke="#dc3545" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
									<path id="Path_651" data-name="Path 651" d="M21,16.5v6" transform="translate(-5.5 -4.5)" fill="none" stroke="#dc3545" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
								</g>
								</svg>
								Rejection Alert</strong>
						<button type="button" class="btn-close" data-bs-dismiss="toast"></button>
					</div>
					<div class="toast-body p-0">
						<div class="fs-6 fw-semi-bold my-2">Are you sure, you want to reject product?</div>

						<label for="elex-multi-vendor-for-woocommerce-reject-vendor-product-input" class="fs-6 fw-semi-bold my-2">Reason(s) for Rejection:</label>
						<textarea type="textarea" class="form-control mb-3" id = "elex-multi-vendor-for-woocommerce-reject-vendor-product-input"></textarea>

						<div class="d-flex gap-3 justify-content-center ">
							<button class="btn px-4 btn-outline-secondary" data-bs-dismiss="toast">Cancel</button>
							<button class="btn px-4 btn-primary" id="elex-multi-vendor-for-woocommerce-reject-vendor-prod-confirm-btn">
								Confirm
							</button>
						</div>
						</div>
					 
				</div>
				<!-- new product button -->
					<button class="btn btn-primary elex-multi-vendor-for-woocommerce-add-product-redirect-btn ms-auto" id="elex-multi-vendor-for-woocommerce-admin-add-product-redirect-btn">
						
						<i class="fa-solid fa-plus"></i>
						<a href="<?php echo esc_html( admin_url() . 'post-new.php?post_type=product' ); ?>">  </a> 
						Add New Product
					</button>
					 
			</div>


			<!-- main content top 2nd link section -->
			<div class="row justify-content-between align-items-start">
				<div class="col-lg-8 col-md-7 overflow-auto mb-2 elex-multi-vendor-for-woocommerce-product-filters">
					<div class="d-flex gap-2 flex-wrap p-md-0 px-2 py-4 elex-table-links-btn">
						<div class="form-group d-flex gap-2 h-100">
							<select name="" id="bulk-status-vendor-product-admin" class="form-select">
								<option value="">Bulk Actions</option>
								<option value="publish">Mark as Approved</option>
								<option value="reject">Mark as Rejected</option>
								<option value="pending">Mark as Pending</option>
								<option value="visible">Enable Visibility</option>
								<option value="hidden">Disable Visibility</option>
							</select>
							<button class="btn btn-primary px-4" id="apply-bulk-action-product-admin-btn">Apply</button>
						</div>

						<?php	
							$filter_link_all = remove_query_arg( array( 'status', 'search', 'page_num', 'enabled','admin_product_page_nonce' ) );
							$filter_link_all = add_query_arg( 'admin_product_page_nonce', $admin_product_page_nonce, $filter_link_all );

							$is_all_filter_active = '';
							if ( 
								( empty( $GET_status ) 
									&& empty( $GET_enabled ) 
								) 
								|| ( ! $GET_status 
								&& ! $GET_enabled )
							) {
								$is_all_filter_active = 'active';
							}
						?>

						<a href="<?php echo esc_url($filter_link_all); ?>" class="btn border border-secondary bg-secondary bg-opacity-10 text-secondary text-nowrap <?php echo esc_attr( $is_all_filter_active ); ?>">
							All
						</a>


						<?php 
							$filter_link_main = remove_query_arg( array('page_num','admin_product_page_nonce') );
							$filter_link_main = add_query_arg( 'admin_product_page_nonce', $admin_product_page_nonce, $filter_link_main );
						?>
						<?php foreach ( $product_statuses as $statusi ) : ?>
							<?php 
								$filter_link = add_query_arg( 'status', $statusi, $filter_link_main );
								$active_class = '';
								if ( ! empty( $GET_status ) && $GET_status === $statusi ) {
									$active_class = 'active';
								}
								 
							?>
							<a href="<?php echo esc_url($filter_link); ?>" class="btn border border-secondary bg-secondary bg-opacity-10 text-secondary text-nowrap <?php echo esc_attr($active_class); ?>">
								<?php echo esc_html( $wp_post_statuses[ $statusi ]->label ); ?>
								<?php if ( isset( $product_count_by_status[ $statusi ] ) && 0 !== $product_count_by_status[ $statusi ] ) : ?>
									<span>(<?php echo esc_html( $product_count_by_status[ $statusi ] ); ?>)</span>
								<?php endif; ?>
							</a>
						<?php endforeach ; ?>

						<?php
							$enabled_status = array( 'visible', 'hidden' );
							foreach ($enabled_status as $status){

								$filter_link = add_query_arg( 'enabled', $status, $filter_link_main );
								$active_class = '';
								if ( ! empty( $GET_enabled ) && $GET_enabled === $status ) {
									$active_class = 'active';
								}
								?>
								<a href="<?php echo esc_url( $filter_link ); ?>" class="btn border border-secondary bg-secondary bg-opacity-10 text-secondary text-nowrap <?php echo esc_attr($active_class); ?>">
									<?php echo esc_html( ucfirst( $status ) ); ?>
								</a>
								<?php
							}
						?>
						
					

					</div>
				</div>
				<div class="col-xl-3 col-lg-4 col-md-5 justify-content-end  mb-3">
				<div class="input-group flex-nowrap justify-content-end h-100 ">
						<select type="text" name="product-select-for-search" id="product-select-for-search" class="form-select select2-noborder" ></select>
						<?php 
						if ( $search_term ) {
							?>
						<button class="input-group-text bg-transparent border-0" id="elex-search-product-admin-button-cross" ><svg xmlns="http://www.w3.org/2000/svg" id="Outline" viewBox="0 0 24 24" width="16" height="16" style="stroke-width:1;stroke:#000"><path d="M23.707.293h0a1,1,0,0,0-1.414,0L12,10.586,1.707.293a1,1,0,0,0-1.414,0h0a1,1,0,0,0,0,1.414L10.586,12,.293,22.293a1,1,0,0,0,0,1.414h0a1,1,0,0,0,1.414,0L12,13.414,22.293,23.707a1,1,0,0,0,1.414,0h0a1,1,0,0,0,0-1.414L13.414,12,23.707,1.707A1,1,0,0,0,23.707.293Z"/></svg></button>
						<?php
						}
						?>
						<button class="input-group-text border-0" id='elex-search-product-admin-button'><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg></button>
				</div>
				<div class=" justify-content-end align-items-end d-flex gap-4 h-100 mt-2">
				<?php 
				if ( ! empty( $GET_enabled ) || ! empty( $GET_status ) ) {
					?>
					<a href="#" class="text-decoration-underline btn fs-6 text-info" id="clear-filter-for-manage-vendor-btn" >Clear Filters</a>

					<?php
				} 
				?>
							<!-- <select type="text" name="vendor-select-for-filter" style="width:100px !important; " id="vendor-select-for-filter" class="form-select" ></select> -->
							<button class="btn text-nowrap btn-outline-primary " id="apply-filter-by-vendor-btn">
							<svg xmlns="http://www.w3.org/2000/svg" width="20" height="18" viewBox="0 0 22 20">
								<path id="Icon_feather-filter" data-name="Icon feather-filter" d="M22.2,2.517H2.2l8,10v6l4,2v-8Z" transform="translate(-1.197 -1.517)" fill="none" stroke="#3f5980" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" />
							</svg>	
							Advance Filter</button>
				</div>
				</div>
			</div>


			<!-- product list table -->
			<div class="table-responsive p-1">
				<table id="elex-multi-vendor-for-woocommerce-prod-table" class="table table-borderless align-middle text-dark ">
					<thead class="table-light rounded-2">
						<tr class="">
							<th><input class="" id="main-check-box-product-admin" type="checkbox" value="" ></th>
							<th scope="col">Product Details</th>
							<th scope="col">Vendor</th>
							<th scope="col">Price ( <?php echo esc_html( get_woocommerce_currency() ); ?> )</th>
							<th scope="col">Commission (%)</th>
							<th scope="col">Status</th>
							<th scope="col">Actions</th>
						</tr>
					</thead>
				
					<tbody>

					<?php 
					if ( empty( $products_elex_mv ) ) {
						?>
						<tr class="shadow-sm rounded-3"><td colspan="7" ><p> No Products Found </p></td></tr>
						<?php
					}
					foreach ( $products_elex_mv as $product ) :
						?>
					<tr class="shadow-sm rounded-3">
							<td ><input class=" product-individ-admin" name="product-individ-admin[]" type="checkbox" value="<?php echo esc_html( $product->get_id() ); ?>" ></td>
							<td class="table-prod-details">
								<div class="d-flex gap-3 align-items-center ">


									<?php echo wp_kses_post( $product->get_image() ); ?>


									<div class="text-start">
										<p class="mb-1"><b><?php echo esc_html( $product->get_name() ); ?></b></p>
										
									</div>
								</div>
							</td>
							<td>
								<h6><a class="pe-none" href="#"><?php echo esc_html( $map_product_with_store[ $product->get_id() ]['title'] ); ?></a></h6>
								<small class="text-secondary pe-none"><?php echo esc_html( $map_product_with_store[ $product->get_id() ]['email'] ); ?></small>
							</td>
							<td>
								<h6 class="pe-none">
									<?php 

										$args_format = array(
											'ex_tax_label' => false,
											'currency'     => '',
											'decimal_separator' => wc_get_price_decimal_separator(),
											'thousand_separator' => wc_get_price_thousand_separator(),
											'decimals'     => wc_get_price_decimals(),
											'price_format' => get_woocommerce_price_format(),
										);

										
										if ( ! $product->is_type( 'variable' ) ) {
											if ( $product->get_price() ) {
												echo number_format( $product->get_price(), $args_format['decimals'], $args_format['decimal_separator'], $args_format['thousand_separator'] );
											}
										} elseif ( $product->is_type( 'variable' ) ) {
											$min_price = $product->get_variation_price( 'min' ) ? $product->get_variation_price( 'min' ) : '0';
											$max_price = $product->get_variation_price( 'max' ) ? $product->get_variation_price( 'max' ) : '0';
											echo ' ' . esc_html( $min_price ) . ' - ' . esc_html( $max_price );
										} else {
											echo '--';
										}
									

								
									
										?>
								</h6>
							</td>
							<td>
								<h6 class="pe-none">
									<?php 
										$pro_com = $product->get_meta( 'elex_mv_commission', true );
									if ( $pro_com ) {

										echo esc_html( $pro_com );    
											// $pro_commission_type = $product->get_meta( 'commission_type', true );
											// var_dump($pro_commission_type);

											// if ( 'percent' === $pro_commission_type ) {
											//  echo '%';
											// }
									} else {
										echo '--';    

									}
									?>
								</h6>			
							</td>
							<td>
							<?php 
							

							if ( 'hidden' === $product->get_catalog_visibility() ) { 
								?>
								<button class=" pe-none btn btn-sm btn-secondary text-white px-4 elex-multi-vendor-for-woocommerce-table-btn-status">Disabled</button>


							<?php
							} elseif ( 'draft' === $product->get_status() ) { 
								?>
							<button class=" pe-none btn btn-sm btn-secondary text-white px-4 elex-multi-vendor-for-woocommerce-table-btn-status">Draft</button>


									<?php
							} elseif ( 'publish' === $product->get_status() ) {
								?>
										<button class=" pe-none btn btn-sm btn-success text-white px-4 elex-multi-vendor-for-woocommerce-table-btn-status">Published</button>
								<?php

							} elseif ( 'reject' === $product->get_status() ) {
								?>
									<button class=" pe-none btn btn-sm btn-danger text-white px-4 elex-multi-vendor-for-woocommerce-table-btn-status">Rejected</button>

								<?php
								if ( ! empty( $product->get_meta( 'elex_mv_rejection_message' ) ) ) {
									?>
										<svg class="elex_mv_admin_product_emblem" data-bs-toggle="popover"  data-bs-trigger="hover focus" data-bs-content="<?php echo esc_html( $product->get_meta( 'elex_mv_rejection_message' ) ); ?>"   title="Reasons for Rejection"  aria-label="" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path fill="#ff855c" d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/></svg>

								<?php 
								}                           
							} elseif ( 'pending' === $product->get_status() ) {
								?>
									<button class=" pe-none btn btn-sm btn-warning text-white px-4 elex-multi-vendor-for-woocommerce-table-btn-status">Pending</button>
								<?php
								if ( ! empty( $product->get_meta( 'elex_mv_rejection_message' ) ) ) {
									?>
										<svg class="elex_mv_admin_product_emblem" data-bs-toggle="popover"  data-bs-trigger="hover focus" data-bs-content="<?php echo esc_html( $product->get_meta( 'elex_mv_rejection_message' ) ); ?>"   title="Reasons for Rejection"  aria-label="" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" height="20" width="20" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path fill="#ff855c" d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"/></svg>
									
								<?php 
								}                         
							}
							?>
															
							</td>
							<td>
								<div class="d-flex gap-2 align-items-center">
									<?php 
									if ( 'reject' !== $product->get_status() ) {
										?>
								<label class="elex-enable-disable-switch">
								<input type="checkbox" 
									<?php 
										if ( 'visible' === $product->get_catalog_visibility() ) {
									
											echo esc_attr( 'checked' );
										} 
										?>
								 
									id="elex_mv_check_enable_<?php echo esc_html( $product->get_id() ); ?>" onclick="changeProductStatusFuncAdmin(<?php echo esc_html( $product->get_id() ); ?>)">
								<div class="switch round"></div>
							</label>
									<svg xmlns="http://www.w3.org/2000/svg" width="1.5" height="22" viewBox="0 0 2 25.587">
										<path id="carrier_seperator" data-name="carrier seperator" d="M2565.89-576v23.587" transform="translate(-2564.89 577)" fill="none" stroke="#707070" stroke-linecap="round" stroke-width="2"/>
										</svg>
									<?php } ?>

										<?php if ( 'publish' === $product->get_status() || 'draft' === $product->get_status() || 'pending' === $product->get_status() ) : ?>

										<div class="elex-multi-vendor-for-woocommerce-vendor-approved-group-btns">
										<div class="d-flex gap-2 align-items-center">
											<button
												class="btn btn-sm text-primary d-flex gap-2 align-items-center elex-multi-vendor-for-woocommerce-edit-product-admin-redirect-btn"  data-prod-id="<?php $product->get_id(); ?>">
											
												<a href="<?php echo esc_html( admin_url() . 'post.php?post=' . $product->get_id() . '&action=edit' ); ?>">  	<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"
													viewBox="0 0 18.638 18.695">
													<g id="Icon_feather-edit-3" data-name="Icon feather-edit-3"
														transform="translate(-3.486 -3.183)">
														<path id="Path_29" data-name="Path 29" d="M17.8,30.363H26.12"
															transform="translate(-4.996 -9.486)" fill="none"
															stroke="#3f5980" stroke-linecap="round"
															stroke-linejoin="round" stroke-width="2" />
														<path id="Path_30" data-name="Path 30"
															d="M16.964,4.775a1.92,1.92,0,0,1,2.773,0,2.308,2.308,0,0,1,0,3.067L7.952,19.344,4.486,20.878l.693-3.834Z"
															transform="translate(0 0)" fill="none" stroke="#3f5980"
															stroke-linecap="round" stroke-linejoin="round"
															stroke-width="2" />
													</g>
												</svg> </a>                                                   
												</button>
										</div>
									</div>

									<?php 
										endif; 
										if ( 'draft' === $product->get_status() || 'pending' === $product->get_status() ) { 
											?>

									<div class="elex-multi-vendor-for-woocommerce-vendor-pending-group-btns">
										<div class="d-flex gap-2 align-items-center">
											<button
												class="btn btn-sm text-primary d-flex gap-2 align-items-center elex_mv_approval_product_from_admin_side" data-status="publish" data-product-id="<?php echo esc_html( $product->get_id() ); ?>" >
												<i class="fa-solid fa-check-double"></i>
												Approve</button>
											<svg xmlns="http://www.w3.org/2000/svg" width="1.5" height="22"
												viewBox="0 0 2 25.587">
												<path id="carrier_seperator" data-name="carrier seperator"
													d="M2565.89-576v23.587" transform="translate(-2564.89 577)"
													fill="none" stroke="#3F5980" stroke-linecap="round"
													stroke-width="2" />
											</svg>

											<button
												class="btn btn-sm text-primary d-flex gap-2 align-items-center elex-multi-vendor-for-woocommerce-vendor-remove-btn elex_mv_approval_product_from_admin_side " data-status="reject" data-product-id="<?php echo esc_html( $product->get_id() ); ?>">
												<svg xmlns="http://www.w3.org/2000/svg" width="9.333" height="9.333"
													viewBox="0 0 9.333 9.333">
													<path id="cancel_icon" data-name="cancel icon"
														d="M12.667,4.273l-.94-.94L8,7.06,4.273,3.333l-.94.94L7.06,8,3.333,11.727l.94.94L8,8.94l3.727,3.727.94-.94L8.94,8Z"
														transform="translate(-3.333 -3.333)" fill="#3f5980" />
												</svg>
												Reject</button>
										</div>
									</div>
									<?php } ?>
								</div>
								
							</td>
							
						</tr>
						<?php 
						endforeach;
					?>
				   
						
					</tbody>
				</table>
			</div>
			<div class="d-flex justify-content-center gap-3">
			<nav aria-label="Page navigation example">
	<ul class="pagination gap-4 mt-3">
	<li class="page-item m-1"><a class="page-link btn border-0
	<?php
	$filter_link = remove_query_arg( array( 'admin_product_page_nonce' ) );
	if ( 1 === $page_number ) {
		?>
	disabled <?php } ?>"  href="
					<?php 
echo esc_url(
	add_query_arg(
		array(
			'page_num' => $prev,
			'admin_product_page_nonce' => $admin_product_page_nonce,
		),
		$filter_link
	) 
); 
					?>
	"><i class="fa-solid fa-chevron-left"></i> Previous</a></li>
	<li class="page-item m-1"><a class="page-link btn border-0
	<?php 
	if ( (string) $total_pages === (string) $page_number ) {
		?>
	disabled <?php } ?>"  href="
					<?php 
$next_url = add_query_arg(
	array(
		'page_num' => $next,
		'admin_product_page_nonce' => $admin_product_page_nonce,
	),
	$filter_link
);
echo esc_url( $next_url ); 
					?>
	">Next <i class="fa-solid fa-chevron-right"></i></a></li>
	</ul>  
</nav>
			</div>

		</div>




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


		<!-- add new product -->
		<div class="bg-dark bg-opacity-25 elex-multi-vendor-for-woocommerce-popup row justify-content-end w-100 mt-4" id="elex-multi-vendor-for-woocommerce-admin-add-product">

			<div class="toast p-2 position-fixed top-0 start-50 translate-middle-x bg-white" id="elex_additem_toast_added_product">
			<div class="toast-header border-0 ">
				<strong class="me-auto">
					<svg xmlns="http://www.w3.org/2000/svg" width="22.415" height="22.026" viewBox="0 0 22.415 22.026" class="me-2">
						<g id="Icon_feather-check-circle" data-name="Icon feather-check-circle" transform="translate(-1.998 -1.979)">
							<path id="Path_646" data-name="Path 646" d="M23,12.076V13a10,10,0,1,1-5.93-9.139" fill="none" stroke="#28a745" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
							<path id="Path_647" data-name="Path 647" d="M26.5,6l-10,10.009-3-3" transform="translate(-3.5 -1.003)" fill="none" stroke="#28a745" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
						</g>
						</svg>
					<span id="elex_additem_toast_added_product_msg" >New Product Added Successfully</span></strong>
				<button type="button" id="elex_additem_toast_added_btn_ok" class="btn-close" data-bs-dismiss="toast"></button>
			</div> 
			</div>

			<div class="col-lg-6 col-md-9 bg-white h-100 ms-auto overflow-auto">
				<div class="py-2 px-5 text-center position-relative mt-4">
					
					<h5 class="my-1">Add Product</h5>
					<button class="btn rounded-circle position-absolute top-50 translate-middle-y end-0 elex-multi-vendor-for-woocommerce-close-product-btn" id="elex-multi-vendor-for-woocommerce-admin-add-product-close-btn">X</button>
				</div>
				
				<form action="" id="elex-multi-vendor-for-woocommerce-admin-vendor-product-form"> 
				<div class="tab-content">
					<!-- product Details -->
					<div class="tab-pane fade show active" id="elex-multi-vendor-for-woocommerce-add-ac-prod-details" role="tabpanel" aria-labelledby="elex-multi-vendor-for-woocommerce-add-ac-prod-details-tab">
						<div class="px-md-5 px-2 py-3">
							<div class="form-group mb-3">
								<h6>Product Name</h6>
								<input type="text" name="name" id="elex-admin-add-vendor-product-name" placeholder="Enter Product Name" class="form-control ">
								<div class="text-danger" id="elex-admin-add-vendor-product-name-error" ></div>
							</div>
						
							<div class="form-group mb-3">
								<h6>Category</h6>
								<select type="text" style="width:100% !important" name="product_category[]" id="elex-admin-add-vendor-product-category" class=" form-select border-2 border-secondary " multiple="true" >
								</select>
							</div>
							<div class="mb-3">
								<h6>Regular Price</h6>
								<div class="input-group mb-3 ">
									<input type="text" class="form-control " name="price" id="elex-admin-add-vendor-product-price" placeholder="Enter Regular Price" >
									<span class="input-group-text elex-form-group-btn px-4" ><?php echo esc_html( get_woocommerce_currency() ); ?></span>
									</div>
									<div class="text-danger" id="elex-admin-add-vendor-product-price-error" ></div>

							</div>

							<div class="mb-3">
								<h6>Sale Price</h6>
								<div class="input-group mb-3 ">
									<input type="text" class="form-control " name="sale_price" id="elex-admin-add-vendor-product-sale-price" placeholder="Enter Sale Price" >
									<span class="input-group-text elex-form-group-btn px-4" ><?php echo esc_html( get_woocommerce_currency() ); ?></span>
									</div>
									<div class="text-danger" id="elex-admin-add-vendor-product-sale-price-error" ></div>

							</div>

							<div class="form-group mb-3">
								<h6>Store</h6>
							<select type="text" style="width:100% !important" name="vendor_name" class="elex-admin-add-vendor-product-vendor-name form-select border-2 border-secondary " >
							</select>
							</div>

							<div class="mb-3">
								<h6>Admin Commission (%)</h6>
								<div class="input-group mb-3 ">
									<input type="number" step="0.01" min="0" class="form-control " name="commission" id="elex-admin-add-vendor-product-commission"  placeholder="<?php echo isset( $site_settings['commission_for_each_sale'] ) ? esc_html( $site_settings['commission_for_each_sale'] ) : ''; ?>" aria-label="Recipient's username" aria-describedby="basic-addon2" value="<?php echo isset( $site_settings['commission_for_each_sale'] ) ? esc_html( $site_settings['commission_for_each_sale'] ) : ''; ?>">
									<!-- <select class="input-group-text elex-form-group-btn pe-4" name = "commission_type" id="elex-admin-add-vendor-product-commission-type" >
										<option <?php echo esc_attr( isset( $site_settings['commission_type_of_sale'] ) && 'percent' === $site_settings['commission_type_of_sale'] ? 'selected' : '' ); ?>  value="percent">Percentage</option>
									</select> -->
									</div>
									<div id="elex-admin-add-vendor-product-commission-error" ></div>

							</div>

							<div class=" form-group mb-3">
								<h6>Product Image</h6>
								<div class="d-flex align-items-center gap-4">
									<img id="elexPreviewImageUploadAdminImage" src="<?php echo esc_url( ELEX_MULTI_VENDOR_MAIN_URL_PATH . 'images/default.jpg' ); ?>" alt="" width="100px">
									<div class="position-relative">
										<button class="btn fw-bold text-info" id="elex-multi-vendor-for-woocommerce-upload-image-btn">Upload</button>
										<input type="file" id="elex-multi-vendor-for-woocommerce-filetag-admin-image" name="elex-multi-vendor-for-woocommerce-filetag-admin-image" class="opacity-0 position-absolute w-100 h-100 top-0 start-0">
									</div>

								</div>
								<div  class="elex-multi-vendor-for-woocommerce-prod-img-name-div-admin mb-5 d-none" >
									<div class = "d-flex gap-2 align-items-center" >
										<div class="elex-multi-vendor-for-woocommerce-prod-img-name-admin"></div>
										<button type="button" class=" btn btn-sm rounded-circle p-1 elex-multi-vendor-for-woocommerce-product-form-remove-image-admin" ><svg xmlns="http://www.w3.org/2000/svg" height="1.5em" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z"/></svg>
										</button>
									</div>
								
								</div>

							</div>
							<div class="d-flex gap-2">
								
								<button class="btn btn-primary w-100 elex-multi-vendor-for-woocommerce-admin-add-product-form-next-btn" type="button"> Add </button>
							</div>

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

			
		</div>
		<?php
			require ELEX_MULTI_VENDOR_PLUGIN_PATH . 'templates/admin-products/admin-advanced-filter.php';
		?>
		
	</div>
