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


							<div class="px-md-5 px-2 py-3 ">
							<form id="variation_edit_add" accept-charset="multipart/form-data"  action="">

								<div class=" mb-3">

									<div class="default-form-values d-none"></div>

								 
								</div>

								<div class="mb-3 d-flex justify-content-between">
									<div class="d-flex gap-2">
										<button type="button" class="btn btn-outline-secondary text-nowrap elex_generate_variations_button">Generate Variations</button>
										<button type="button" class="btn btn-outline-secondary text-nowrap elex_add_manually_button"  >Add Manually</button>
										<select id="field_to_edit_add" class="select variation_actions hidden">
										<option value="">Bulk actions</option>
											<option value="delete_all"><?php esc_html_e( 'Delete all variations', 'elex-multi-vendor-for-woocommerce' ); ?></option>
											<optgroup label="<?php esc_attr_e( 'Status', 'elex-multi-vendor-for-woocommerce' ); ?>">
												<option value="toggle_enabled"><?php esc_html_e( 'Toggle &quot;Enabled&quot;', 'elex-multi-vendor-for-woocommerce' ); ?></option>
											</optgroup>
											<optgroup label="<?php esc_attr_e( 'Pricing', 'elex-multi-vendor-for-woocommerce' ); ?>">
												<option value="variable_regular_price"><?php esc_html_e( 'Set regular prices', 'elex-multi-vendor-for-woocommerce' ); ?></option>
												<option value="variable_regular_price_increase"><?php esc_html_e( 'Increase regular prices (fixed amount or percentage)', 'elex-multi-vendor-for-woocommerce' ); ?></option>
												<option value="variable_regular_price_decrease"><?php esc_html_e( 'Decrease regular prices (fixed amount or percentage)', 'elex-multi-vendor-for-woocommerce' ); ?></option>
												<option value="variable_sale_price"><?php esc_html_e( 'Set sale prices', 'elex-multi-vendor-for-woocommerce' ); ?></option>
												<option value="variable_sale_price_increase"><?php esc_html_e( 'Increase sale prices (fixed amount or percentage)', 'elex-multi-vendor-for-woocommerce' ); ?></option>
												<option value="variable_sale_price_decrease"><?php esc_html_e( 'Decrease sale prices (fixed amount or percentage)', 'elex-multi-vendor-for-woocommerce' ); ?></option>
												<option value="variable_sale_schedule"><?php esc_html_e( 'Set scheduled sale dates', 'elex-multi-vendor-for-woocommerce' ); ?></option>
											</optgroup>
											<optgroup label="<?php esc_attr_e( 'Inventory', 'elex-multi-vendor-for-woocommerce' ); ?>">
												<option value="variable_stock"><?php esc_html_e( 'Stock', 'elex-multi-vendor-for-woocommerce' ); ?></option>                        						
												<option value="variable_low_stock_amount"><?php esc_html_e( 'Low stock threshold', 'elex-multi-vendor-for-woocommerce' ); ?></option>
											</optgroup>
											<optgroup label="<?php esc_attr_e( 'Shipping', 'elex-multi-vendor-for-woocommerce' ); ?>">
												<option value="variable_length"><?php esc_html_e( 'Length', 'elex-multi-vendor-for-woocommerce' ); ?></option>
												<option value="variable_width"><?php esc_html_e( 'Width', 'elex-multi-vendor-for-woocommerce' ); ?></option>
												<option value="variable_height"><?php esc_html_e( 'Height', 'elex-multi-vendor-for-woocommerce' ); ?></option>
												<option value="variable_weight"><?php esc_html_e( 'Weight', 'elex-multi-vendor-for-woocommerce' ); ?></option>
											</optgroup>
										
											
										</select>
									</div>

									<div class="elex_mv_expand_close_edit_variation d-none">
									<span class = "elex_mv_number_of_variation"></span> Variation(<a href="#" class="expand_all_variation">Expand</a>/<a href="#" class="close_all_variation">Close</a>)
									</div>
								</div>

								<div class="elex_mv_add_variations_parent_main">
									<input type="hidden" class="variable_parent_post_id" name="product_id" />
									<div class="mb-3 p-2  elex-multi-vendor-for-woocommerce-note  d-flex justify-content-between align-items-center">
										<small>Variations (and their attributes) that do not have prices will not be shown in your store.</small>
										<button type="button" class="btn btn-sm btn-outline-primary bg-white" id="add_price_add">Add Price</button>
									</div>
									<div class="elex_mv_add_variations_parent">

									</div>

								</div>
								</form>


								<template id="template-for-variations">

									<div class = "elex_mv_parent_variations">
										<div class="border border-2 mb-3 elex_mv_variation_created">
											<div class="bg-light d-flex justify-content-between px-2 py-1">
												<div class="d-flex gap-3 align-items-center">
													<div class="fs-6 fw-bold elex_mv_variation_id " ></div>
													<input type="hidden" class="variable_post_id" />
													<div class="elex_attribute_variation_values_select" >


													</div>
											   
												</div>

												<div class="d-flex align-items-center">
													<button type="button" class="btn btn-sm text-primary elex_mv_mini_max_btn"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="16"><path d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg></button>
													<button type="button" class="btn text-danger elex_mv_remove_variation_button">Remove</button>
												</div>
											</div>

											<div class="p-2 elex_mv_mini_max_sec">
												<div class="d-flex justify-content-between align-items-center mb-3">
													<div class="d-flex align-items-center gap-4 position-relative  elex-multi-vendor-for-woocommerce-image-section-variatio">

														<img class="elexPreviewImageUploadVariatio" src="<?php echo esc_url( ELEX_MULTI_VENDOR_MAIN_URL_PATH . 'images/default.jpg' ); ?>" alt="" width="100px">
															<div class="h-100 position-absolute start-50 top-50 translate-middle w-100">
																<!-- <button class="btn fw-bold h-100 position-absolute start-0 top-0 w-100" id="elex-multi-vendor-for-woocommerce-upload-image-btn"></button> -->
																<input type="file" name="upload_image_id" class="elex-multi-vendor-for-woocommerce-filetag-variatio opacity-0 position-absolute w-100 h-100 top-0 start-0">
																<button type="button"  class="btn fw-bold h-100 position-absolute start-0 top-0 w-100 elex-multi-vendor-for-woocommerce-remove-image-btn-variatio d-none" ><svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 0 384 512"><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"></path></svg></button>

															</div>   
															

													</div>
													<div class="mb-3 elex_mv_switch_div">
														<div class="fs-6 mb-1">
															SKU
														</div>
														<input type="text" class="form-control border border-secondary border-2 elex_mv_product_variation_sku">
													</div>
												</div>
			
												<!-- note -->
											
			
												<div class="py-2 border-0 border-top border-bottom mb-3">
													<div class="d-flex gap-2">
														<div class="form-check">
															<input class="form-check-input elex_mv_product_variation_enabled" type="checkbox" value="" >
															<label class="form-check-label" for="elex_mv_product_variation_enabled">
																Enabled
															</label>
														</div>
														<div class="form-check">
															<input class="form-check-input elex_mv_product_variation_downloadable_check_edit" type="checkbox" value="" id="">
															<label class="form-check-label" >
																Downloadable
															</label>
														</div>
														<div class="form-check">
															<input class="form-check-input elex_mv_product_variation_virtual_edit" type="checkbox" value="" id="">
															<label class="form-check-label">
																Virtual
															</label>
														</div>
														<div class="form-check">
															<input class="form-check-input elex_mv_product_variation_manage_stock_check" type="checkbox" value="" id="">
															<label class="form-check-label" >
																Manage stock?
															</label>
														</div>
													</div>
												</div>

												<div class="row ">
													<div class="col-md-6">
														<div class="fs-6 mb-1">Regular Price</div>
														<div class="input-group mb-3 border rounded border-2 border-secondary">
															<input type="text" class="form-control border-0 elex_mv_product_variation_regular_price" placeholder=""
																aria-describedby="basic-addon2">
															<span class="input-group-text border-0" id="basic-addon2"><?php echo esc_html( get_woocommerce_currency() ); ?></span>
														</div>
													</div>
				
													<div class="col-md-6">
														<div class="fs-6 mb-1">Sale Price <a role="button" href="#" class="elex_mv_variation_product_schedule_btn">Schedule</a></div>
														<div class="input-group mb-3 border rounded border-2 border-secondary">
															<input type="text" class="form-control border-0 elex_mv_product_variation_sale_price" placeholder=""
																aria-describedby="basic-addon2">
															<span class="input-group-text border-0" id="basic-addon2"><?php echo esc_html( get_woocommerce_currency() ); ?></span>
														</div>
													</div>
				
												</div>

												<div class="d-none elex_mv_variation_product_schedule_sec mb-3">
													<div class="d-flex gap-3">
														<div class="flex-fill">
															<div class="fs-6 mb-1">Sale Start Date</div>
															<input type="date"
																class="form-control mb-3 border rounded border-2 border-secondary elex_mv_sale_start_date"  name="variable_sale_price_dates_from[]">
														</div>
														<div class="flex-fill">
															<div class="fs-6 mb-1">Sale End Date</div>
															<input type="date"
																class="form-control mb-3 border rounded border-2 border-secondary elex_mv_sale_end_date"  name="variable_sale_price_dates_to[]">
														</div>
													</div>

													<a href="#" class="elex_mv_product_schedule_cancel_btn">Cancel</a>
												</div>

												<div class="elex_mv_stock_sec_add d-none">
													<div class="row">
														<div class="col-md-6">
															<div class="fs-6 mb-1">Stock Quantity</div>
															<input type="text"
																class="form-control mb-3 border rounded border-2 border-secondary elex_mv_product_variation_stock_quantity">
														</div>
														<div class="col-md-6">
															<div class="fs-6 mb-1">Allow backorders?</div>
															<select name="" id="" class="form-select border-2 variations_default border-secondary elex_mv_product_variation_allow_backorders">
																<option value="">Do Not Allow</option>
																<option value="no">Do Not Allow</option>
																<option value="notify">Allow, but notify customer</option>
																<option value="yes">Allow</option>
															</select>
														</div>
													</div>
			
			
													<div class="mb-3">
															<div class="fs-6 mb-1">Low Stock Threshold</div>
															<input type="number" name="" id="" class="form-select border border-2 border-secondary elex_mv_product_variation_low_stock_threshold">
															  
													</div>
												</div>
												<div class="elex_mv_stock_status_sec_add d-none">
													<div class="row">
													
													<div class="col-md-6">
															<div class="fs-6 mb-1">Stock Status</div>
															<select name="" id="" class="form-select border-2 variations_default border-secondary elex_mv_product_variation_stock_status">
																<option value="instock">In Stock</option>
																<option value="outofstock">Out of stock</option>
																<option value="onbackorder">On backorder</option>

															</select>
														</div>
													</div>
			
			
												</div>

												<div class="row elex_mv_shipping_variation_section">
													<div class="col-md-6 ">
													<div class="fs-6 mb-1">Product Weight ( 
													<?php 
													$weight_unit = get_option( 'woocommerce_weight_unit' );
																echo esc_html( $weight_unit ); 
													?>
																)
																</div>                                                        <div class="input-group mb-3 border rounded border-2 border-secondary">
															<input type="text" class="form-control border-0 elex_mv_product_variation_weight" placeholder=""
																aria-describedby="basic-addon2">
														</div>
													</div>
				
													<div class="col-md-6 ">
													<div class="fs-6 mb-1">Product Dimensions (L*B*H) ( 
													<?php 
															$dimension_unit = get_option( 'woocommerce_dimension_unit' );
															echo esc_html( $dimension_unit ); 
													?>
																						)
														</div>                                                        <div class="d-flex gap-1">
															<input type="text" class="form-control border-2 border-secondary elex_mv_product_variation_length">
															<input type="text" class="form-control border-2 border-secondary elex_mv_product_variation_width">
															<input type="text" class="form-control border-2 border-secondary elex_mv_product_variation_height">
														</div>
													</div>

													<div class=" mb-3">
														<div class="fs-6 mb-1">Shipping class</div>
														<select name="" id="" class="form-select border-2 border-secondary variations_default elex_mv_product_variation_shipping_class">
															<option value="">Same as Parent</option>
														</select>
													</div>
												</div>


												

												<div class=" mb-3">
														<div class="fs-6 mb-1">Description</div>
														<textarea name="" id=""  rows="3" class="form-control border-2 border-secondary elex_mv_product_variation_description"></textarea>
												</div>


												<div class="downloadble_div elex-multi-vendor-for-woocommerce-edit-variable-download-file-div d-none">
													<div class="mb-1 fs-6 fw-bold">Downloadable files</div>
													<div class="px-2 py-1 border border-2 mb-1">
														<table class="elex_mv_edit_variable_table_download_file">
															<thead>
																<tr>
																	<th width="200px" class="">Name </th>
																	<th class="">File URL</th>
																	<th class=""></th>
																	<th class=""></th>
																</tr>
															</thead>
															<tbody class="border-0">
																
															</tbody>
														</table>

														<button type="button" class="btn btn-primary elex-multi-vendor-for-woocommerce-add-variable-download-file-row mt-2">Add File</button>
													</div>

													<div class="row mb-1">
														<div class="col-md-6">
															<div class="fs-6 mb-1">Download limit</div>
															<input type="text"
																class="form-control mb-3 border rounded border-2 border-secondary elex_mv_download_limit_variation_edit">
														</div>
														<div class="col-md-6">
															<div class="fs-6 mb-1">Download Expiry</div>
															<input type="text"
																class="form-control mb-3 border rounded border-2 border-secondary elex_mv_download_expiry_variation_edit">
														</div>
													</div>
												</div>


												<template id="template-for-var-product-file-download">
													<tr>
														<td style="width: 200px;">																
																<input type="text" class="form-control border-1 elex_mv_name_file_download" >
																<input type="text" hidden class="form-control border-1 elex_mv_hash_file_download" >
														</td>
														<td>
															<input type="text" class="form-control border-1 elex_mv_url_file_download">
														</td>
														<td >															
																<div class="position-relative">
																<button  type="button"  class="btn fw-bold text-info elex-multi-vendor-for-woocommerce-edit-upload-download-file-btn">Choose File</button>
																<input type="file" name="elex_mv_file_download[]" class="opacity-0 position-absolute w-100 h-100 top-0 start-0 elex-multi-vendor-for-woocommerce-file-download">
																</div>
														</td>
														<td style="width: 20px;">															
															<button  type="button"  class="btn rounded-circle elex-multi-vendor-for-woocommerce-remove-dowload-tr-simple-product"><i class="fa-regular fa-circle-xmark"></i></button>

														</td>
													</tr>
												</template>	


											</div>
										</div>
									</div>
								
								</template>
								


								<div class="d-flex gap-2">
								<button class="btn btn-outline-primary w-100 elex_mv_save_variations"  type="button" >Save Variations</button>

								<button class="btn btn-primary w-100 elex-multi-vendor-for-woocommerce-product-next-btn elex_mv_save_variations" data-button="next"   type="button" >Save and Next</button>
								</div>
							</div>


