<?php

if (isset($block['data']['preview_image_help'])) {    /* rendering in inserter preview  */
    echo '<img src="' . $block['data']['preview_image_help'] . '" style="width:100%; height:auto;">';
} else 
{    
    $box_title                    = get_field('ftm_ie_title');
    $box_title_color              = get_field('ftm_ie_title_color');
    $box_title_tag                = get_field('ftm_ie_title_tag');    
    $show_box_title               = get_field('ftm_ie_show_title');    
    $box_vertical_bar_color       = get_field('ftm_ie_vertical_bar_color');
    $box_content                  = get_field('ftm_ie_box_content');    
    $box_content_color            = get_field('ftm_ie_box_content_color');    
    $box_content_background       = get_field('ftm_ie_box_background_color');    
    $box_unique_id                = "ftm-information-element_" . $block["id"];

?>

<blockquote id="<?php echo $box_unique_id ?>" class="ftm-information-element"
    style="border-left: 7px solid <?php echo $box_vertical_bar_color ?>; background-color: <?php echo $box_content_background ;?> ">
    <?php if( $show_box_title == 1 ){
        if( !empty( $box_title_tag ) ){
            $title_html = '<'.$box_title_tag.' class="ftm-information-element-title" style="color:'. $box_title_color .'" >'. $box_title .'</'.$box_title_tag.'>';
            echo $title_html;
        }
        else
        {
            $title_html = '<h2 class="ftm-information-element-title"  style="color:'. $box_title_color .'">'. $box_title .'</h2>';
            echo $title_html;
        }     
    }
    ?>
    <div class="ftm-information-element-content"  style="color: <?php echo $box_content_color; ?>;">
        <?php echo $box_content; ?>
    </div>
</blockquote>

<?php
}
?>