<?php

$sType = '<section class="add-edit-subgroup type" data-groupname="type">';

	$sType .= '<div class="article-form">';
	
		$sType .= '<div class="select-radio-container type-container'.(!empty($oMijnOVIS->parsedDetails->condition) ? ' active' : false).'" id="condition-container" data-field="condition">			
			<div class="type" id="sale-condition-container">
				<label class="label-sub">Conditie</label>
				<span class="open-sub'.(!empty($oMijnOVIS->parsedDetails->condition) ? ' active' : false).'" id="open-sub-condition" data-group="type" data-field="condition" data-title="conditie" data-default="Kies conditie">'.($oMijnOVIS->parsedDetails->condition == 'used' ? 'Gebruikt' : ($oMijnOVIS->parsedDetails->condition == 'new' ? 'Nieuw' : 'Kies conditie')).'</span>';

				$sType .= '<div class="sub-container" id="sub-condition">';
					$sType .= '<label for="set-condition-used">Gebruikt</label>';
					$sType .= '<input class="select-radio condition-radio" type="checkbox" name="set-condition" id="set-condition-used" value="gebruikt"'.($oMijnOVIS->parsedDetails->condition == 'used' ? ' checked="checked"' : false).'>';
					
					$sType .= '<label for="set-condition-new">Nieuw</label>';
					$sType .= '<input class="select-radio condition-radio" type="checkbox" name="set-condition" id="set-condition-new" value="nieuw"'.($oMijnOVIS->parsedDetails->condition == 'new' ? ' checked="checked"' : false).'>';
				$sType .= '</div>';					
						
			$sType .= '</div>
		</div>';
		
		$sType .= '<div class="type-container'.(!empty($oMijnOVIS->parsedDetails->subcategory) ? ' active' : ' not-loaded-yet').'" id="subcategory-container">			
			<div class="type" id="sale-subcategory-container">
						
			</div>
		</div>';
		
		$sType .= '<div class="type-container" id="chassisnummer-container">			
			<div class="type" id="sale-chassisnummer-container">
				<label for="set-chassisnummer">Chassisnummer</label>
				<input autocomplete="false" class="text-input auto-save" type="text" name="set-chassisnummer" maxlength="17" id="set-chassisnummer" value="'.($oMijnOVIS->parsedDetails->chassisNumber).'">	
			</div>
		</div>';
		
		$sType .= '<div class="type-container" id="model-boat-container">			
			<div class="type" id="sale-model-boat-container">
				<label for="set-model-boat">Model</label>
				<input autocomplete="false" class="text-input auto-save" type="text" name="set-model-boat" id="set-model-boat" value="'.($oMijnOVIS->parsedDetails->modelBoat).'">			
			</div>
		</div>';
		
		$sType .= '<div class="type-container" id="title-boat-container">			
			<div class="type" id="sale-title-boat-container">
				<label for="set-title-boat">Titel</label>
				<input autocomplete="false" class="text-input auto-save" type="text" name="set-title-boat" id="set-title-boat" value="'.($oMijnOVIS->parsedDetails->titleBoat).'">			
			</div>
		</div>';
		
		$sType .= '<div class="type-container" id="ligplaats-boat-container">			
			<div class="type" id="sale-ligplaats-boat-container">
				<label for="set-ligplaats-boat">Ligplaats</label>
				<input autocomplete="false" class="text-input auto-save" type="text" name="set-ligplaats-boat" id="set-ligplaats-boat" value="'.($oMijnOVIS->parsedDetails->ligplaatsBoat).'">			
			</div>
		</div>';
		
		$sType .= '<div class="type-container" id="trailer-boat-container">			
			<div class="multiple">
				<label for="set-trailer-boat" class="switch">
					<input name="set-trailer-boat" class="checkboxinput" id="set-trailer-boat" type="checkbox" '.(!empty($oMijnOVIS->parsedDetails->trailerBoat) ? ' checked="checked"' : false).'>
					<span class="slider"></span>
				</label>	
			</div>
		</div>';
		
		$sType .= '<div class="select-radio-container type-container'.(!empty($oMijnOVIS->parsedDetails->personsBoat) ? ' active' : false).'" id="persons-boat-container" data-field="persons-boat">			
			<div class="type" id="sale-persons-boat-container">
				<label class="label-sub">Aantal personen</label>
				<span class="open-sub'.(!empty($oMijnOVIS->parsedDetails->personsBoat) ? ' active' : false).'" id="open-sub-persons-boat" data-group="type" data-field="persons-boat" data-title="personen" data-default="Personen">'.(!empty($oMijnOVIS->parsedDetails->personsBoat) ? $oMijnOVIS->parsedDetails->personsBoat . ($oMijnOVIS->parsedDetails->personsBoat == '1' ? ' persoon' : ' personen') : 'Personen').'</span>';

				$sType .= '<div class="sub-container" id="sub-persons-boat">';
					
					for($i=1; $i<=25; $i++){
						$sType .= '<label for="set-persons-boat-'.strtolower($i).'">'.$i.'</label>';
						$sType .= '<input class="select-radio persons-boat-radio" type="checkbox" name="set-persons-boat" id="set-persons-boat-'.strtolower($i).'" value="'.strtolower($i).'"'.(strtolower($oMijnOVIS->parsedDetails->personsBoat) == strtolower($i) ? ' checked="checked"' : false).'>';						
					}
					
				$sType .= '</div>';					
						
			$sType .= '</div>
		</div>';
		
		$sType .= '<div class="select-radio-container type-container'.(!empty($oMijnOVIS->parsedDetails->materialBoat) ? ' active' : false).'" id="material-boat-container" data-field="material-boat">			
			<div class="type" id="sale-material-boat-container">
				<label class="label-sub">Romp materiaal</label>
				<span class="open-sub'.(!empty($oMijnOVIS->parsedDetails->materialBoat) ? ' active' : false).'" id="open-sub-material-boat" data-group="type" data-field="material-boat" data-title="Materiaal" data-default="Materiaal">'.(!empty($oMijnOVIS->parsedDetails->materialBoat) ? ucfirst($oMijnOVIS->parsedDetails->materialBoat) : 'Materiaal').'</span>';

				$sType .= '<div class="sub-container" id="sub-material-boat">';
					
					$aBoatMaterials = array('Polyester','Staal','Aluminium','Hout','Composiet','PVC','OVerig');
					
					foreach($aBoatMaterials as $key => $sBoatMaterial){
						$sType .= '<label for="set-material-boat-'.strtolower($key).'">'.$sBoatMaterial.'</label>';
						$sType .= '<input class="select-radio material-boat-radio" type="checkbox" name="set-material-boat" id="set-material-boat-'.strtolower($key).'" value="'.strtolower($sBoatMaterial).'"'.(strtolower($oMijnOVIS->parsedDetails->materialBoat) == strtolower($sBoatMaterial) ? ' checked="checked"' : false).'>';						
					}
					
				$sType .= '</div>';					
						
			$sType .= '</div>
		</div>';
		
		$sType .= '<div class="type-container" id="color-boat-container">			
			<div class="type" id="sale-color-boat-container">
				<label for="set-color-boat">Rompkleur</label>
				<input autocomplete="false" class="text-input auto-save" type="text" name="set-color-boat" maxlength="20" id="set-color-boat" value="'.($oMijnOVIS->parsedDetails->colorBoat).'">			
			</div>
		</div>';
		
		$sType .= '<div class="type-container" id="deck-boat-container">			
			<div class="type" id="sale-deck-boat-container">
				<label for="set-deck-boat">Dek kleur</label>
				<input autocomplete="false" class="text-input auto-save" type="text" name="set-deck-boat" maxlength="20" id="set-deck-boat" value="'.($oMijnOVIS->parsedDetails->deckBoat).'">			
			</div>
		</div>';
		
		$sType .= '<div class="select-radio-container type-container'.(!empty($oMijnOVIS->parsedDetails->boatTrailerAxles) ? ' active' : false).'" id="boattrailer-axles-container" data-field="boattrailer-axles">			
			<div class="type" id="sale-boattrailer-axles-container">
				<label class="label-sub">Assen</label>
				<span class="open-sub'.(!empty($oMijnOVIS->parsedDetails->boatTrailerAxles) ? ' active' : false).'" id="open-sub-boattrailer-axles" data-group="type" data-field="boattrailer-axles" data-title="Assen" data-default="Aantal assen">'.(!empty($oMijnOVIS->parsedDetails->boatTrailerAxles) ? $oMijnOVIS->parsedDetails->boatTrailerAxles . ( $oMijnOVIS->parsedDetails->boatTrailerAxles == 1 ? ' as' : ' assen' ) : 'Aantal assen').'</span>';

				$sType .= '<div class="sub-container" id="sub-boattrailer-axles">';
					
					for($i=1; $i<=4; $i++){
						$sType .= '<label for="set-boattrailer-axles-'.strtolower($i).'">'.$i.' '.($i == 1 ? ' as' : ' assen').'</label>';
						$sType .= '<input class="select-radio boattrailer-axles-radio" type="checkbox" name="set-boattrailer-axles" id="set-boattrailer-axles-'.strtolower($i).'" value="'.strtolower($i).'"'.(strtolower($oMijnOVIS->parsedDetails->boatTrailerAxles) == strtolower($i) ? ' checked="checked"' : false).'>';						
					}
					
				$sType .= '</div>';					
						
			$sType .= '</div>
		</div>';
		
		$sType .= '<div class="select-radio-container type-container'.(!empty($oMijnOVIS->parsedDetails->boatTrailerPlug) ? ' active' : false).'" id="boattrailer-plug-container" data-field="boattrailer-plug">			
			<div class="type" id="sale-boattrailer-plug-container">
				<label class="label-sub">Stekker</label>
				<span class="open-sub'.(!empty($oMijnOVIS->parsedDetails->boatTrailerPlug) ? ' active' : false).'" id="open-sub-boattrailer-plug" data-group="type" data-field="boattrailer-plug" data-title="Stekker" data-default="Stekker">'.(!empty($oMijnOVIS->parsedDetails->boatTrailerPlug) ? $oMijnOVIS->parsedDetails->boatTrailerPlug : 'Stekker').'</span>';

				$sType .= '<div class="sub-container" id="sub-boattrailer-plug">';
					
					$aDoorTypes = array('7-polig','13-polig');
					
					foreach($aDoorTypes as $key => $sDoorType){
						$sType .= '<label for="set-boattrailer-plug-'.strtolower($key).'">'.$sDoorType.'</label>';
						$sType .= '<input class="select-radio boattrailer-plug-radio" type="checkbox" name="set-boattrailer-plug" id="set-boattrailer-plug-'.strtolower($key).'" value="'.strtolower($sDoorType).'"'.(strtolower($oMijnOVIS->parsedDetails->boatTrailerPlug) == strtolower($sDoorType) ? ' checked="checked"' : false).'>';						
					}
					
				$sType .= '</div>';					
						
			$sType .= '</div>
		</div>';
		
		$sType .= '<div class="type-container" id="boattrailer-braked-container">	
			<div class="multiple">
				<label for="set-boattrailer-braked" class="switch">
					<input name="set-boattrailer-braked" class="checkboxinput" id="set-boattrailer-braked" type="checkbox" '.(!empty($oMijnOVIS->parsedDetails->braked) ? ' checked="checked"' : false).'>
					<span class="slider"></span>
				</label>	
			</div>
		</div>';
		
		$sType .= '<div class="type-container" id="boattrailer-kantelbaar-container">	
			<div class="multiple">
				<label for="set-boattrailer-kantelbaar" class="switch">
					<input name="set-boattrailer-kantelbaar" class="checkboxinput" id="set-boattrailer-kantelbaar" type="checkbox" '.(!empty($oMijnOVIS->parsedDetails->kantelbaar) ? ' checked="checked"' : false).'>
					<span class="slider"></span>
				</label>	
			</div>
		</div>';
		
		$sType .= '<div class="select-radio-container type-container'.(!empty($oMijnOVIS->parsedDetails->sizeBoat) ? ' active' : false).'" id="size-boat-container" data-field="size-boat">			
			<div class="type" id="sale-size-boat-container">
				<label class="label-sub">Bootafmeting</label>
				<span class="open-sub'.(!empty($oMijnOVIS->parsedDetails->sizeBoat) ? ' active' : false).'" id="open-sub-size-boat" data-group="type" data-field="size-boat" data-title="Bootafmeting" data-default="Afmeting">'.(!empty($oMijnOVIS->parsedDetails->sizeBoat) ? ucfirst($oMijnOVIS->parsedDetails->sizeBoat) : 'Afmeting').'</span>';

				$sType .= '<div class="sub-container" id="sub-size-boat">';
					
					$aBoatSizes = array('Minder dan 6 meter','6 tot 9 meter','Meer dan 9 meter');
					
					foreach($aBoatSizes as $key => $sBoatSize){
						$sType .= '<label for="set-size-boat-'.strtolower($key).'">'.$sBoatSize.'</label>';
						$sType .= '<input class="select-radio size-boat-radio" type="checkbox" name="set-size-boat" id="set-size-boat-'.strtolower($key).'" value="'.strtolower($sBoatSize).'"'.(strtolower($oMijnOVIS->parsedDetails->sizeBoat) == strtolower($sBoatSize) ? ' checked="checked"' : false).'>';						
					}
					
				$sType .= '</div>';					
						
			$sType .= '</div>
		</div>';
		
		$sType .= '<div class="select-radio-container type-container'.(!empty($oMijnOVIS->parsedDetails->engineFuel) ? ' active' : false).'" id="engine-fuel-container" data-field="engine-fuel">			
			<div class="type" id="sale-engine-fuel-container">
				<label class="label-sub">Brandstof</label>
				<span class="open-sub'.(!empty($oMijnOVIS->parsedDetails->engineFuel) ? ' active' : false).'" id="open-sub-engine-fuel" data-group="type" data-field="engine-fuel" data-title="brandstof" data-default="Brandstof">'.(!empty($oMijnOVIS->parsedDetails->engineFuel) ? $oMijnOVIS->parsedDetails->engineFuel : 'Brandstof').'</span>';

				$sType .= '<div class="sub-container" id="sub-engine-fuel">';
					
					$aEngineFuels = array('Benzine','Diesel','LPG','Hybride','Elektrisch');
					
					foreach($aEngineFuels as $sEngineFuel){
						$sType .= '<label for="set-engine-fuel-'.strtolower($sEngineFuel).'">'.$sEngineFuel.'</label>';
						$sType .= '<input class="select-radio engine-fuel-radio" type="checkbox" name="set-engine-fuel" id="set-engine-fuel-'.strtolower($sEngineFuel).'" value="'.strtolower($sEngineFuel).'"'.(strtolower($oMijnOVIS->parsedDetails->engineFuel) == strtolower($sEngineFuel) ? ' checked="checked"' : false).'>';						
					}
					
				$sType .= '</div>';					
						
			$sType .= '</div>
		</div>';
		
		$sType .= '<div class="type-container" id="engine-tank-capacity-container">			
			<div class="type" id="sale-engine-tank-capacity-container">
				<label for="set-engine-tank-capacity">Tankinhoud (liter)</label>
				<input autocomplete="false" class="text-input number-input auto-save" type="tel" name="set-engine-tank-capacity" inputmode="numeric" maxlength="10" id="set-engine-tank-capacity" value="'.($oMijnOVIS->parsedDetails->engineTankCapacity).'">			
			</div>
		</div>';
		
		$sType .= '<div class="type-container" id="engine-power-container">			
			<div class="type" id="sale-engine-power-container">
				<label for="set-engine-power">Vermogen (pk)</label>
				<input autocomplete="false" class="text-input number-input auto-save" type="tel" name="set-engine-power" inputmode="numeric" maxlength="10" id="set-engine-power" value="'.($oMijnOVIS->parsedDetails->enginePower).'">			
			</div>
		</div>';
		
		$sType .= '<div class="select-radio-container type-container'.(!empty($oMijnOVIS->parsedDetails->engineTailLength) ? ' active' : false).'" id="engine-tail-length-container" data-field="engine-tail-length">			
			<div class="type" id="sale-engine-tail-length-container">
				<label class="label-sub">Staartlengte</label>
				<span class="open-sub'.(!empty($oMijnOVIS->parsedDetails->engineTailLength) ? ' active' : false).'" id="open-sub-engine-tail-length" data-group="type" data-field="engine-tail-length" data-title="staartlengte" data-default="Staartlengte">'.(!empty($oMijnOVIS->parsedDetails->engineTailLength) ? ucfirst($oMijnOVIS->parsedDetails->engineTailLength) : 'Staartlengte').'</span>';

				$sType .= '<div class="sub-container" id="sub-engine-tail-length">';
										
					$aEngineTypes = array('Kortstaart','Langstaart','Extra langstaart');
					
					foreach($aEngineTypes as $sEngineType){
						$sType .= '<label for="set-engine-tail-length-'.strtolower($sEngineType).'">'.$sEngineType.'</label>';
						$sType .= '<input class="select-radio engine-tail-length-radio" type="checkbox" name="set-engine-tail-length" id="set-engine-tail-length-'.strtolower($sEngineType).'" value="'.strtolower($sEngineType).'"'.(strtolower($oMijnOVIS->parsedDetails->engineTailLength) == strtolower($sEngineType) ? ' checked="checked"' : false).'>';						
					}
					
				$sType .= '</div>';					
						
			$sType .= '</div>
		</div>';
		
		$sType .= '<div class="select-radio-container type-container'.(!empty($oMijnOVIS->parsedDetails->engineStartsystem) ? ' active' : false).'" id="engine-startsystem-container" data-field="engine-startsystem">			
			<div class="type" id="sale-engine-startsystem-container">
				<label class="label-sub">startsysteem</label>
				<span class="open-sub'.(!empty($oMijnOVIS->parsedDetails->engineStartsystem) ? ' active' : false).'" id="open-sub-engine-startsystem" data-group="type" data-field="engine-startsystem" data-title="startsysteem" data-default="Startsysteem">'.(!empty($oMijnOVIS->parsedDetails->engineStartsystem) ? ucfirst($oMijnOVIS->parsedDetails->engineStartsystem) : 'Startsysteem').'</span>';

				$sType .= '<div class="sub-container" id="sub-engine-startsystem">';
										
					$aEngineTypes = array('Elektrisch','Handmatig','Handmatig en elektrisch');
					
					foreach($aEngineTypes as $sEngineType){
						$sType .= '<label for="set-engine-startsystem-'.strtolower($sEngineType).'">'.$sEngineType.'</label>';
						$sType .= '<input class="select-radio engine-startsystem-radio" type="checkbox" name="set-engine-startsystem" id="set-engine-startsystem-'.strtolower($sEngineType).'" value="'.strtolower($sEngineType).'"'.(strtolower($oMijnOVIS->parsedDetails->engineStartsystem) == strtolower($sEngineType) ? ' checked="checked"' : false).'>';						
					}
					
				$sType .= '</div>';					
						
			$sType .= '</div>
		</div>';
		
		$sType .= '<div class="select-radio-container type-container'.(!empty($oMijnOVIS->parsedDetails->engineSteering) ? ' active' : false).'" id="engine-steering-container" data-field="engine-steering">			
			<div class="type" id="sale-engine-steering-container">
				<label class="label-sub">Besturing</label>
				<span class="open-sub'.(!empty($oMijnOVIS->parsedDetails->engineSteering) ? ' active' : false).'" id="open-sub-engine-steering" data-group="type" data-field="engine-steering" data-title="besturing" data-default="Besturing">'.(!empty($oMijnOVIS->parsedDetails->engineSteering) ? ucfirst($oMijnOVIS->parsedDetails->engineSteering) : 'Besturing').'</span>';

				$sType .= '<div class="sub-container" id="sub-engine-steering">';
										
					$aEngineTypes = array('Afstandsbediening','Knuppelbesturing');
					
					foreach($aEngineTypes as $sEngineType){
						$sType .= '<label for="set-engine-steering-'.strtolower($sEngineType).'">'.$sEngineType.'</label>';
						$sType .= '<input class="select-radio engine-steering-radio" type="checkbox" name="set-engine-steering" id="set-engine-steering-'.strtolower($sEngineType).'" value="'.strtolower($sEngineType).'"'.(strtolower($oMijnOVIS->parsedDetails->engineSteering) == strtolower($sEngineType) ? ' checked="checked"' : false).'>';						
					}
					
				$sType .= '</div>';					
						
			$sType .= '</div>
		</div>';		
		
		$sType .= '<div class="type-container" id="engine-cylinders-container">			
			<div class="type" id="sale-engine-cylinders-container">
				<label for="set-engine-cylinders">Aantal cilinders</label>
				<input autocomplete="false" class="text-input number-input auto-save" type="tel" name="set-engine-cylinders" inputmode="numeric" maxlength="10" id="set-engine-cylinders" value="'.($oMijnOVIS->parsedDetails->engineCylinders).'">			
			</div>
		</div>';		
		
		$sType .= '<div class="type-container" id="engine-size-container">			
			<div class="type" id="sale-engine-size-container">
				<label for="set-engine-size">Cilinderinhoud</label>
				<input autocomplete="false" class="text-input number-input auto-save" type="tel" name="set-engine-size" inputmode="numeric" maxlength="10" id="set-engine-size" value="'.($oMijnOVIS->parsedDetails->engineSize).'">			
			</div>
		</div>';		
		
		$sType .= '<div class="type-container" id="engine-dry-weight-container">			
			<div class="type" id="sale-engine-dry-weight-container">
				<label for="set-engine-dry-weight">Gewicht droog</label>
				<input autocomplete="false" class="text-input number-input auto-save" type="tel" name="set-engine-dry-weight" inputmode="numeric" maxlength="10" id="set-engine-dry-weight" value="'.($oMijnOVIS->parsedDetails->engineDryWeight).'">			
			</div>
		</div>';		
		
	$sType .= '</div>';

$sType .= '</section>';

return $sType;