<?php

class Intense_Column extends Intense_Shortcode {

	function __construct() {
		parent::__construct();

		global $intense_visions_options;

		$this->title = __( 'Layout Column', 'intense' );
		$this->category = __( 'Layout', 'intense' );
		$this->show_preview = false;		
		$this->is_container = true;
		$this->hidden = true;
		$this->parent = 'intense_row';		
	}

	function shortcode( $atts, $content = null ) {
		global $intense_visions_options;
		extract( shortcode_atts( $this->get_shortcode_defaults( null, $atts ), $atts ) );

		return "<div class='intense " . ( $size == "hide" ? "hidden-lg " : "col-lg-$size " ) .
		( isset( $extra_small_size ) ? ( $extra_small_size == "hide" ? "hidden-xs " : "col-xs-$extra_small_size " ) : "col-xs-12 " ) .
		( isset( $small_size ) ? ( $small_size == "hide" ? "hidden-sm " : "col-sm-$small_size " ) : "col-sm-12 " ) .
		( isset( $medium_size ) ? ( $medium_size == "hide" ? "hidden-md " : "col-md-$medium_size " ) : "col-md-$size " ) .
		( $nogutter ? "nogutter " : "" ) .
		( $class ? $class . " " : "" ) .
		"'>" . do_shortcode( $content ) . "</div>";
	}
}