<?php if ( ! defined( 'ABSPATH' ) ) {
exit;} ?>
	<!-- ======================main content============ -->

		<div class="elex-multi-vendor-for-woocommerce-main ps-2 flex-1">
			<!-- ===========side panel open button========= -->

			<div class="toast p-2 position-fixed top-0 start-50 translate-middle-x bg-white mt-4" id="vendor_setting_saved_success_toast">
			<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 elex-toast-icon-success">
						<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>
					<svg xmlns="http://www.w3.org/2000/svg" width="22.415" height="22.026" viewBox="0 0 22.415 22.026" class="me-2 elex-toast-icon-error d-none">
						<g id="Icon_feather-x-circle" data-name="Icon feather-x-circle" transform="translate(-1.998 -1.979)">
							<circle cx="13" cy="13" r="10" fill="none" stroke="#dc3545" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
							<line x1="10" y1="10" x2="16" y2="16" stroke="#dc3545" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
							<line x1="16" y1="10" x2="10" y2="16" stroke="#dc3545" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"/>
						</g>
					</svg>
					<span id="toast_message_mv" >Changes Saved Successfully</span></strong>
				<button type="button" class="btn-close" data-bs-dismiss="toast"></button>
			</div> 
			</div>

			<div class="d-flex gap-4 align-items-center elex-multi-vendor-for-woocommerce-side-panel-open-div d-md-none mb-3">
				<!-- side panel open button -->
				<button class=" btn p-1 shadow-none fs-5   bg-white text-primary position-relative " id="elex-multi-vendor-for-woocommerce-side-panel-open-btn"><svg height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"/></svg></button>
				<div class="fs-5  fw-semi-bold m-0 ">Vendor Settings</div>
			</div>
			<div>
				<div class=" d-flex bg-info bg-opacity-10 justify-content-between ">
					<ul class="elex-multi-vendor-for-woocommerce-shipping-link d-flex gap-3 nav px-3 ">
						<li class="nav-item ">
							<a href="?menu_tab=store_profile" class="nav-link active ">Store Profile</a>
						</li>
						<!-- <li class="nav-item ">
							<a href="?menu_tab=general_settings" class="nav-link ">General Settings</a>
						</li> -->
						<li class="nav-item ">
							<a href="?menu_tab=store_page_settings" class="nav-link ">Store Settings</a>
						</li>
					</ul>
				</div>

			
				
				<div class="row p-3 ">
					<div class="col-lg-5 ">
					<form id="vendor-settings-details-form">
					<?php wp_nonce_field( 'elex_mv_settings_page_nonce', 'vendor_settings_nonce' ); ?>
					<input type="hidden" name="action" value="elex_mv_vendor_settings_details"></input>
						<div class="form-group mb-3">
							<label for=" ">Store Image</label>

							<div class="card shadow-sm border border-secondary  elex-multi-vendor-for-woocommerce-profile-pic-card rounded-3 overflow-hidden" >
								<div class="card-body p-0 ratio ratio-4x3">
									<img   id="elexImageVendorUpload" src="<?php echo ! empty( $thumbnail_url ) ? esc_url( $thumbnail_url ) : esc_url( ELEX_MULTI_VENDOR_MAIN_URL_PATH . 'assets/images/default-store-icon.svg' ); ?>" alt="" >
									<input type="file" id="elex-multi-vendor-for-woocommerce-vendor-setting-filetag" name="elex-multi-vendor-for-woocommerce-vendor-setting-filetag" class="opacity-0 position-absolute w-50 h-100 top-0 start-0">
								</div>
								<div class="card-footer bg-secondary bg-opacity-50 py-1 px-0 d-flex justify-content-center">
									<button class="btn btn-sm border-0 border-end border-secondary py-0 elex-multi-vendor-for-woocommerce-vendor-setting-edit-filetag-btn" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-outline-primary" data-bs-placement="bottom" title="Edit"><i class="fa-regular fa-pen-to-square"></i></button>
									<button class="btn btn-sm elex-multi-vendor-for-woocommerce-vendor-setting-filetag-delete-btn py-0" type="button" data-bs-toggle="tooltip" data-bs-custom-class="tooltip-outline-primary" data-bs-placement="bottom" title="Remove"><i class="fa-regular fa-trash-can" ></i></button>
								</div>
							</div>

						</div>
						<input type="text" class="form-control border-2 border-secondary" name="deleted_image" id="elex_mv_vendor_edit_deleted_image" hidden>
						<input type="text" class="form-control border-2 border-secondary" name="user_id" id="user_id" value="<?php echo esc_attr( $store_id ); ?>" hidden>
						<div class="form-group mb-3 ">
							<label for=" ">Store Name</label>
							<input type="text" name="store_name" id="elex_vendor_settings_name" value="<?php echo esc_attr( get_post_meta( $store_id , 'elex_mv_title' , true ) ); ?>" class="form-control ">
							<div id="elex_vendor_settings_name_error"></div>
						</div>

						<div class="form-group mb-3 ">
							<label for=" " class="text-secondary ">Email Id</label>
							<input type="text" name="email" id="elex_vendor_settings_email"value="<?php echo esc_attr( get_post_meta( $store_id , 'elex_mv_email' , true ) ); ?>"  class="form-control " placeholder=" ">
							<div id="elex_vendor_settings_email_error"></div>
						</div>

						<div class="form-group mb-3 ">
							<label for=" ">Phone Number</label><br>
							<input type="hidden" name="dial_code" class="form-control" id="elex-vendor-settings-dial_code" value="<?php echo esc_attr( get_post_meta( $store_id , 'elex_mv_dial_code' , true ) ); ?>">
							<input type="hidden" name="country_iso" class="form-control" id="elex-vendor-settings-country_iso" value="<?php echo esc_attr( get_post_meta( $store_id , 'elex_mv_country_iso' , true ) ); ?>">
							<input type="text" name="phone_number" id="elex-vendor-settings-number" value="<?php echo esc_attr( get_post_meta( $store_id , 'elex_mv_phone_number' , true ) ); ?>" class="form-control " placeholder=" ">
							<div id="elex-vendor-settings-number_error"></div>
						</div>

						
						<div class="form-group mb-3 ">
							<label for=" ">Store Full Address</label>
							<input type="text" name="address" id="elex_vendor_settings_address" value="<?php echo esc_attr( get_post_meta( $store_id , 'elex_mv_address' , true ) ); ?>" class="form-control " placeholder=" ">
							<div id="elex_vendor_settings_address_error"></div>
						</div>

						<div class="form-group mb-3 ">
							<label for=" ">City</label>
							<input type="text" name="city" id="elex_vendor_settings_city" value="<?php echo esc_attr( get_post_meta( $store_id , 'elex_mv_city' , true ) ); ?>" class="form-control " placeholder=" ">
							<div id="elex_vendor_settings_city_error"></div>
						</div>

						<div class="form-group mb-3 ">
							<label for=" ">Postcode / Zip</label>
							<input type="text"  id="elex_vendor_settings_zipcode" name="postal_code" value="<?php echo esc_attr( get_post_meta( $store_id , 'elex_mv_postal_code' , true ) ); ?>" class="form-control " placeholder=" ">
							<div id="elex_vendor_settings_zipcode_error"></div>

						</div>

	

						<div class="form-group mb-3 ">
							<label for=" ">Country</label>
							<select type="text" name="country" class="form-control border-2 border-secondary" id="elex_vendor_settings_country" >
										<option value="">--Choose Country-- </option>

										<?php 
											$wc_countries = new \WC_Countries();
											$countries    = $wc_countries->get_countries();
										foreach ( $countries as $country_code => $country_name ) {
											if ( get_post_meta( $store_id , 'elex_mv_country', true ) === $country_code ) {
												echo '<option value="' . esc_attr( $country_code ) . '" selected >' . esc_attr( $country_name ) . '</option>';
											} else {
												echo '<option value="' . esc_attr( $country_code ) . '" >' . esc_attr( $country_name ) . '</option>';
											}
										}
										
										?>
										
										</select>
							<!-- <input type="text" name="country" id="elex_vendor_settings_country" value=""class="form-control " placeholder=" "> -->
							<div id="elex_vendor_settings_country_error"></div>

						</div> 

						<div class="form-group mb-3 ">
							<label for=" ">State / County</label>
							<select type="text" name="state" id="elex_vendor_settings_state"  class="form-control " placeholder=" "></select>
							<div id="elex_vendor_settings_state_error"></div>

						</div>
						<div class="my-4 ">
							<button class="btn btn-primary vendor-setting-save-changes" id="vendor-setting-save-changes" type="button" >Save Changes</button>
						</div>
						</form>
					</div>
					
				</div>


			







			</div>




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











		</div>
	
