<?php
 
add_filter( 'ppt_blocks_args', 	array('block_text156',  'data') );
add_action( 'text156',  		array('block_text156', 'output' ) );
add_action( 'text156-css',  	array('block_text156', 'css' ) );
add_action( 'text156-js',  	array('block_text156', 'js' ) );

class block_text156 {

	function __construct(){}		

	public static function data($a){  global $CORE;
	
	
  
		$a['text156'] = array(
			"name" 		=> "Style 156",
			"image"		=> "text156.jpg",
			"cat"		=> array("text","faq"),
			"desc" 		=> "", 
			"order" 	=> 0, 
			"widget" => "ppt-text",	
			"data" 	=> array( ),	
			
			"defaults" => array( ), 
			
					
		);		
		
		return $a;
	
	} public static function output(){ global $CORE, $text_settings;
	 	
		 // ALL DEFAULT FIELDS
		 $df = ppt_theme_blocks_defaults("text"); 
		  
		$cc = array(	  
		
		
		);
		
		$df = array_merge($df, $cc);
		
		// APPLY ELEMENTOR
		if(!empty($text_settings)){
			foreach($df as $k => $v){				
				if(isset($text_settings[$k]) && $text_settings[$k] != "" ){
					$df[$k] = $text_settings[$k];
				}
			}		
		}  
 
	ob_start();
	
	?>

<section class="section-60 ppt-block-text text156">
  <div class="container py-14 py-md-16">
    <div class="row">
      <div class="col-lg-7 mx-auto">

<?php

$defaults = array(

  1 => "How do I get my subscription receipt?",
  2 => "Are there any discounts for people in need?",
  3 => "Do you offer a free trial edit?",
  4 => "How do I reset my Account password?", 
  5 => "Can I cancel my subscription?",
  6 => "Which payment methods do you accept?",
  7 => "Is my credit card information secure?",
  8 => "Do you offer a free trial?",
  9 => "How do I reset my Account password?", 
  10 => "Do you have phone support?", 
          
);


$i=1; while($i < 11){  

	$tt = "";
	if(isset($text_settings['f'.$i.'a'])){
		$tt = $text_settings['f'.$i.'a'];
	}
	
	if($i > 4 && strlen($tt) < 1){
		$i++; 
		continue; 
	}

?> 

        <div class="ppt-show-hide mb-4" ppt-border1>
          <div class="card-header py-4">
            <div class="d-flex justify-content-between">
              <div class="text-600" data-ppt-f<?php echo $i; ?>a>
              <?php if(isset($defaults[$i])){ echo $defaults[$i]; } ?>
              </div>
              <span class="fa fa-plus hide-show btn-show">&nbsp;</span> <span class="fa fa-minus show-hide btn-show">&nbsp;</span>
            </div>
          </div>
          <div class="hide">
            <div class="card-body py-4">
              <p  data-ppt-f<?php echo $i; ?>b>Fusce dapibus, tellus ac cursus commodo, tortor
                mauris condimentum nibh, ut fermentum massa justo sit amet risus.
                Cras mattis consectetur purus sit amet fermentum. Praesent commodo
                cursus magna, vel scelerisque nisl consectetur et. Cum sociis
                natoque penatibus et magnis dis parturient montes, nascetur ridiculus
                mus. Donec sed odio dui. Cras justo odio, dapibus ac facilisis.</p>
            </div>
          </div>
        </div>

        <?php $i++; } ?> 
 
    </div>
  </div>
</section>
<?php
 

		$output = ob_get_contents();
		ob_end_clean();
echo ppt_theme_block_output($output, $df, array("text", "text156"));
	
	}
		public static function css(){
		ob_start();
?>
<style>
 
.text156 .card-header {
    margin-bottom: 0;
    background: 0 0;
    border: 0;
    padding: 0.9rem 1.3rem 0.85rem;
	
}
.text156 .card-header .btn { font-size:16px; }
</style>
<?php
		$output = ob_get_contents();
		ob_end_clean();
		echo $output;
		}	
		public static function js(){
		return "";
		ob_start();
		?>
<?php	
		$output = ob_get_contents();
		ob_end_clean();
		echo $output;
		}	
}

?>