<?php $setting = get_setting(); ?>
<?php $filter = ['social-site','about','services','resume','review','skills','portfolio','blog','appointment','contacts','teams','facts'] ?>
<?php if(count($pricing) > 0): ?>
	<?php if(isset($setting['pricing_layout']) && $setting['pricing_layout']==1): ?>

		<div class="pricing_area mi-padding-top">
			<div class="container">
				<div class="snip1214">
					<div class="row">
						<div class="col-sm-12">
							<div class="mi-title text-center">
								<h1><?= html_escape(lang('package_heading')) ?></h1>
							</div>
						</div>
					</div>
					<div class="row mt-50" style="justify-content: center;">
						<?php $i=1; foreach ($pricing as $key => $row): ?>
						<?php if(isset($row['features']) && count($row['features']) > 0): ?>
						<div class="col-sm-6 col-xs-12 col-md-6 col-lg-4">
							<div class="pricing_content <?= $i==2?'featured':'';?>">
								<div class="package_tag">
									<h3 class="plan-title"><?= $row['type_name'] ;?></h3>
								</div>
								<div class="plan-cost home-cost">
									<span class="plan-price"><?= get_currency('icon').' '.$row['price']?></span>
									<span class="plan-type">/ <?= !empty(lang($row['type']))?lang($row['type']):$row['type'];?></span>

									<h5><?= $row['type_limit']==0?(!empty(lang('unlimited'))?lang('unlimited'):"Unlimited"):(!empty(lang('only'))?lang('only'):"Only")." ".html_escape($row['type_limit']);?></h5>
									<h5 class="text-center"><?= !empty(lang('vcard_limit'))?lang('vcard_limit'):'vCard Limit' ;?> : <?= type_limit($row['card_limit']) ;?></h5>
									<h5 class="text-center"><?= !empty(lang('vcard_information_limit'))?lang('vcard_information_limit'):'vCard Information Limit' ;?> : <?= type_limit($row['vcard_limit']) ;?></h5>
								</div>
								<div class="pricing_body">
									<ul class="plan-features">
										<?php foreach ($features as $key => $feature): ?>
											<?php $feature_id = get_price_feature_id($feature['id'],$row['id']); ?>
											<li><i class="fa <?= isset($feature_id) && $feature_id['feature_id']==$feature['id']?'fa-check c_green':'fa-times c_red';?>"> </i> <?= $feature['features'];?></li>
										<?php endforeach ?>
									</ul>
								</div>
								<div class="plan-select"><a href="<?php echo base_url('create-profile-'.html_escape($row['slug'])); ?>"><?= html_escape(lang('pricing_btn_text')) ?></a></div>
							</div>
						</div>
					<?php endif; ?>
					<?php $i++; endforeach ?>
					</div>
				</div>
			</div>
		</div>
	<?php elseif($setting['pricing_layout']==2): ?>
	<div class="pricing_area mi-padding-top mi-padding-bottom">
		<div class="container">
			<div class="row">
				<div class="col-sm-12">
					<div class="mi-title text-center mb-30">
						<h1><?= html_escape(lang('package_heading')) ?></h1>
					</div>
				</div>
			</div>
			<div class="row text-center">
				
				<?php $i=1; foreach ($pricing as $key => $row): ?>
					<?php if(isset($row['features']) && count($row['features']) > 0): ?>
						<div class="col-sm-6 col-xs-12 col-md-6 col-lg-4 princing-item <?= $i==1?"red":($i==2?"blue":"green")?>">
							<div class="pricing-2">
								<div class="pricing-divider ">
									<h3 class="text-light"><?= $row['type_name'] ;?></h3>
									<?php if($row['type']=='free'): ?>
										<h4 class="my-0 display-2 text-light font-weight-normal mb-3"> <?= !empty(lang('free'))?lang('free'):"Free";?> </h4>

									<?php elseif($row['type']=='trial'): ?>
										<span class="h5"><?= !empty(lang('trial_month'))?lang('trial_month'):"Trial For 1 Month";?></span>
									<?php else: ?>
										<h4 class="my-0 display-2 text-light font-weight-normal mb-3"> <span class="h3"><?= get_currency('icon');?></span> <?= $row['price']?> <span class="h5">/ <?= !empty(lang($row['type']))?lang($row['type']):$row['type'];?></span>  </h4>
									<?php endif; ?>

									<h5 class="text-light"><?= $row['type_limit']==0?(!empty(lang('unlimited'))?lang('unlimited'):"Unlimited"):(!empty(lang('only'))?lang('only'):"Only")." ".html_escape($row['type_limit']);?> / <?= !empty(lang('features'))?lang('features'):"Features"?></h5>
									<h5 class="text-light"><?= !empty(lang('vcard_limit'))?lang('vcard_limit'):'vCard Limit' ;?> : <?= type_limit($row['card_limit']) ;?></h5>
									<h5 class="text-light"><?= !empty(lang('vcard_information_limit'))?lang('vcard_information_limit'):'vCard Information Limit' ;?> : <?= type_limit($row['vcard_limit']) ;?></h5>
									

									<svg class='pricing-divider-img' enable-background='new 0 0 300 100' height='100px' id='Layer_1' preserveAspectRatio='none' version='1.1' viewBox='0 0 300 100' width='300px' x='0px' xml:space='preserve' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg' y='0px'>
										<path class='deco-layer deco-layer--1' d='M30.913,43.944c0,0,42.911-34.464,87.51-14.191c77.31,35.14,113.304-1.952,146.638-4.729
										c48.654-4.056,69.94,16.218,69.94,16.218v54.396H30.913V43.944z' fill='#FFFFFF' opacity='0.6'></path>
										<path class='deco-layer deco-layer--2' d='M-35.667,44.628c0,0,42.91-34.463,87.51-14.191c77.31,35.141,113.304-1.952,146.639-4.729
										c48.653-4.055,69.939,16.218,69.939,16.218v54.396H-35.667V44.628z' fill='#FFFFFF' opacity='0.6'></path>
										<path class='deco-layer deco-layer--3' d='M43.415,98.342c0,0,48.283-68.927,109.133-68.927c65.886,0,97.983,67.914,97.983,67.914v3.716
										H42.401L43.415,98.342z' fill='#FFFFFF' opacity='0.7'></path>
										<path class='deco-layer deco-layer--4' d='M-34.667,62.998c0,0,56-45.667,120.316-27.839C167.484,57.842,197,41.332,232.286,30.428
										c53.07-16.399,104.047,36.903,104.047,36.903l1.333,36.667l-372-2.954L-34.667,62.998z' fill='#FFFFFF'></path>
									</svg>
								</div>
								<div class="card-body bg-white mt-0 shadow">
									<ul class="list-unstyled mb-5 position-relative">
										<?php foreach ($features as $key => $feature): ?>
											<?php $feature_id = get_price_feature_id($feature['id'],$row['id']); ?>
											<li><i class="fa <?= isset($feature_id['feature_id']) && $feature_id['feature_id']==$feature['id']?'fa-check':'fa-times';?>"> </i> <?= $feature['features'];?></li>
										<?php endforeach ?>
									</ul>
									<a href="<?php echo base_url('create-profile-'.html_escape($row['slug'])); ?>" class="btn btn-lg btn-block  btn-custom "><?= html_escape(lang('pricing_btn_text')) ?></a>
								</div>
							</div>
						</div>
					<?php endif; ?>
				<?php $i++; endforeach ?>
		
			</div>
		</div>
	</div>
	<?php elseif($setting['pricing_layout']==3): ?>
		<style>
			.pricing_body {
			    flex-direction: column;
			    padding-left: 0;
			    margin-left: 0;
			}
			ul.plan-features.profileFreatures {
			    display: flex;
			    align-items: center;
			    flex-direction: row;
			    flex-wrap: wrap;
			    padding-left: 32px;
			    margin: 15px 0 22px 0;
			}
			ul.plan-features.profileFreatures li {
			    min-width: 145px;
			    text-align: left;
			    display: flex;
			    align-items: center;
			    justify-content: flex-start;
			    font-weight: normal;
			}
			.pricing_body {
			    position: relative;
			    display: flex;
			    align-items: initial; 
			    justify-content: initial; 
			    padding: 20px 0;
			}
			.plan-features li{
			    font-weight: bold;
			}
			ul.plan-features.profileFreatures li i{
			    opacity: .6;
			}
		</style>	
		<div class="pricing_area mi-padding-top">
			<div class="container">
				<div class="snip1214">
					<div class="row">
						<div class="col-sm-12">
							<div class="mi-title text-center">
								<h1><?= html_escape(lang('package_heading')) ?></h1>
							</div>
						</div>
					</div>
					<div class="row mt-50" style="justify-content: center;">
						<?php $i=1; foreach ($pricing as $key => $row): ?>
						<?php if(isset($row['features']) && count($row['features']) > 0): ?>
						<div class="col-sm-6 col-xs-12 col-md-6 col-lg-4">
							<div class="pricing_content <?= $i==2?'featured':'';?>">
								<div class="package_tag">
									<h3 class="plan-title"><?= $row['type_name'] ;?></h3>
								</div>
								<div class="plan-cost home-cost">
									<span class="plan-price"><?= get_currency('icon').' '.$row['price']?></span>
									<span class="plan-type">/ <?= !empty(lang($row['type']))?lang($row['type']):$row['type'];?></span>

									<h5><?= $row['type_limit']==0?(!empty(lang('unlimited'))?lang('unlimited'):"Unlimited"):(!empty(lang('only'))?lang('only'):"Only")." ".html_escape($row['type_limit']);?></h5>
									<h5 class="text-center"><?= !empty(lang('vcard_limit'))?lang('vcard_limit'):'vCard Limit' ;?> : <?= type_limit($row['card_limit']) ;?></h5>
									<h5 class="text-center"><?= !empty(lang('vcard_information_limit'))?lang('vcard_information_limit'):'vCard Information Limit' ;?> : <?= type_limit($row['vcard_limit']) ;?></h5>
								</div>
								<div class="pricing_body">
									<ul class="plan-features">
										<?php foreach ($features as $key => $feature): ?>
											<?php if($feature['slug']=='home'): ?>
												<?php $feature_id = get_price_feature_id($feature['id'],$row['id']); ?>
												<li><i class="fa <?= isset($feature_id) && $feature_id['feature_id']==$feature['id']?'fa-check c_green':'fa-times c_red';?>"> </i> <?= $feature['features'];?></li>
											<?php endif;?>
										<?php endforeach; ?>
									</ul>

									<ul class="plan-features profileFreatures">
										<?php foreach ($features as $key => $feature): ?>
											<?php if(in_array($feature['slug'],$filter)): ?>
												<?php $feature_id = get_price_feature_id($feature['id'],$row['id']); ?>
												<li><i class="fa <?= isset($feature_id) && $feature_id['feature_id']==$feature['id']?'fa-check c_green':'fa-times c_red';?>"> </i> <?= $feature['features'];?></li>
											<?php endif;?>
										<?php endforeach; ?>
									</ul>

									<ul class="plan-features">
										<?php foreach ($features as $key => $feature): ?>
											<?php if($feature['slug']=='qr_code' || $feature['slug']=='vcard' || $feature['slug']=='pwa' ): ?>
												<?php $feature_id = get_price_feature_id($feature['id'],$row['id']); ?>
												<li><i class="fa <?= isset($feature_id) && $feature_id['feature_id']==$feature['id']?'fa-check c_green':'fa-times c_red';?>"> </i> <?= $feature['features'];?></li>
											<?php endif;?>
										<?php endforeach; ?>
									</ul>
								</div>
								<div class="plan-select"><a href="<?php echo base_url('create-profile-'.html_escape($row['slug'])); ?>"><?= html_escape(lang('pricing_btn_text')) ?></a></div>
							</div>
						</div>
					<?php endif; ?>
					<?php $i++; endforeach ?>
				</div>
			</div>
		</div>
	</div>
	<?php elseif($setting['pricing_layout']==4): ?>
		<style>
			.pricing_body {
			    flex-direction: column;
			    padding-left: 0;
			    margin-left: 0;
			}
			ul.profileFreatures {
			    display: flex!important;
			    align-items: center;
			    flex-direction: row;
			    flex-wrap: wrap;
			    padding-left: 32px;
			    margin: 15px 0 22px 0;
			}
			ul.list-unstyled.profileFreatures li {
			    min-width: 138px;
			    text-align: left;
			    display: flex;
			    align-items: center;
			    justify-content: flex-start;
			    font-weight: normal;
			}
			.pricing_body {
			    position: relative;
			    display: flex;
			    align-items: initial; 
			    justify-content: initial; 
			    padding: 20px 0;
			}
			.list-unstyled li{
			    font-weight: bold;
			}
			ul.list-unstyled.profileFreatures li i{
			    opacity: .6;
			}
			.card-body.bg-white.mt-0.shadow {
			    display: flex;
			    align-items: inherit;
			    flex-direction: column;
			    justify-content: center;
			}
		</style>	
	<div class="pricing_area mi-padding-top mi-padding-bottom">
		<div class="container">
			<div class="row">
				<div class="col-sm-12">
					<div class="mi-title text-center mb-30">
						<h1><?= html_escape(lang('package_heading')) ?></h1>
					</div>
				</div>
			</div>
			<div class="row text-center">
				
				<?php $i=1; foreach ($pricing as $key => $row): ?>
					<?php if(isset($row['features']) && count($row['features']) > 0): ?>
						<div class="col-sm-6 col-xs-12 col-md-6 col-lg-4 princing-item <?= $i==1?"red":($i==2?"blue":"green")?>">
							<div class="pricing-2">
								<div class="pricing-divider ">
									<h3 class="text-light"><?= $row['type_name'] ;?></h3>
									<?php if($row['type']=='free'): ?>
										<h4 class="my-0 display-2 text-light font-weight-normal mb-3"> <?= !empty(lang('free'))?lang('free'):"Free";?> </h4>

									<?php elseif($row['type']=='trial'): ?>
										<span class="h5"><?= !empty(lang('trial_month'))?lang('trial_month'):"Trial For 1 Month";?></span>
									<?php else: ?>
										<h4 class="my-0 display-2 text-light font-weight-normal"> <span class="h3"><?= get_currency('icon');?></span> <?= $row['price']?> <span class="h5">/ <?= !empty(lang($row['type']))?lang($row['type']):$row['type'];?></span>  </h4>
									<?php endif; ?>

									<h5 class="text-light"><?= $row['type_limit']==0?(!empty(lang('unlimited'))?lang('unlimited'):"Unlimited"):(!empty(lang('only'))?lang('only'):"Only")." ".html_escape($row['type_limit']);?> / <?= !empty(lang('features'))?lang('features'):"Features"?></h5>
									<h5 class="text-light"><?= !empty(lang('vcard_limit'))?lang('vcard_limit'):'vCard Limit' ;?> : <?= type_limit($row['card_limit']) ;?></h5>
									<h5 class="text-light"><?= !empty(lang('vcard_information_limit'))?lang('vcard_information_limit'):'vCard Information Limit' ;?> : <?= type_limit($row['vcard_limit']) ;?></h5>

									<svg class='pricing-divider-img' enable-background='new 0 0 300 100' height='100px' id='Layer_1' preserveAspectRatio='none' version='1.1' viewBox='0 0 300 100' width='300px' x='0px' xml:space='preserve' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns='http://www.w3.org/2000/svg' y='0px'>
										<path class='deco-layer deco-layer--1' d='M30.913,43.944c0,0,42.911-34.464,87.51-14.191c77.31,35.14,113.304-1.952,146.638-4.729
										c48.654-4.056,69.94,16.218,69.94,16.218v54.396H30.913V43.944z' fill='#FFFFFF' opacity='0.6'></path>
										<path class='deco-layer deco-layer--2' d='M-35.667,44.628c0,0,42.91-34.463,87.51-14.191c77.31,35.141,113.304-1.952,146.639-4.729
										c48.653-4.055,69.939,16.218,69.939,16.218v54.396H-35.667V44.628z' fill='#FFFFFF' opacity='0.6'></path>
										<path class='deco-layer deco-layer--3' d='M43.415,98.342c0,0,48.283-68.927,109.133-68.927c65.886,0,97.983,67.914,97.983,67.914v3.716
										H42.401L43.415,98.342z' fill='#FFFFFF' opacity='0.7'></path>
										<path class='deco-layer deco-layer--4' d='M-34.667,62.998c0,0,56-45.667,120.316-27.839C167.484,57.842,197,41.332,232.286,30.428
										c53.07-16.399,104.047,36.903,104.047,36.903l1.333,36.667l-372-2.954L-34.667,62.998z' fill='#FFFFFF'></path>
									</svg>
								</div>
								<div class="card-body bg-white mt-0 shadow">
									<ul class="list-unstyled  position-relative">
										<?php foreach ($features as $key => $feature): ?>
											<?php if($feature['slug']=='home'): ?>
												<?php $feature_id = get_price_feature_id($feature['id'],$row['id']); ?>
												<li><i class="fa <?= isset($feature_id) && $feature_id['feature_id']==$feature['id']?'fa-check c_green':'fa-times c_red';?>"> </i> <?= $feature['features'];?></li>
											<?php endif;?>
										<?php endforeach; ?>
									</ul>

									<ul class="list-unstyled position-relative profileFreatures pt-6">
										<?php foreach ($features as $key => $feature): ?>
											<?php if(in_array($feature['slug'],$filter)): ?>
												<?php $feature_id = get_price_feature_id($feature['id'],$row['id']); ?>
												<li><i class="fa <?= isset($feature_id) && $feature_id['feature_id']==$feature['id']?'fa-check c_green':'fa-times c_red';?>"> </i> <?= $feature['features'];?></li>
											<?php endif;?>
										<?php endforeach; ?>
									</ul>

									<ul class="list-unstyled  position-relative">
										<?php foreach ($features as $key => $feature): ?>
											<?php if($feature['slug']=='qr_code' || $feature['slug']=='vcard' || $feature['slug']=='pwa' ): ?>
												<?php $feature_id = get_price_feature_id($feature['id'],$row['id']); ?>
												<li><i class="fa <?= isset($feature_id) && $feature_id['feature_id']==$feature['id']?'fa-check c_green':'fa-times c_red';?>"> </i> <?= $feature['features'];?></li>
											<?php endif;?>
										<?php endforeach; ?>
									</ul>


									<a href="<?php echo base_url('create-profile-'.html_escape($row['slug'])); ?>" class="btn btn-lg btn-block  btn-custom "><?= html_escape(lang('pricing_btn_text')) ?></a>
								</div>
							</div>
						</div>
					<?php endif; ?>
				<?php $i++; endforeach ?>
		
			</div>
		</div>
	</div>
	<?php endif; ?>
<?php endif; ?>
