<?php
    // Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
    $featuredImage = get_the_post_thumbnail_url( $fab_item->getID(), 'large' );
    $modal         = $fab_item->get_modal();
    $iconCover     = $modal && $modal->get_navigation()['iconCover'] ? true : false;
?>
<div class="font-sans">
    <?php if ( $featuredImage ) : ?>
        <div class="fab-modal-featured-img block">
            <img src="<?php echo esc_url( $featuredImage ); ?>"
                alt="<?php echo esc_attr( $fab_item->getTitle() ); ?> Cover"
                class="w-full h-full"
            />
        </div>
    <?php elseif ( $iconCover ) : ?>
        <div class="fab-modal-icon-container cursor-move block w-full flex items-center justify-center hidden md:flex" style="min-height: 200px; background-color: <?php echo esc_attr( $fab_item->getTemplate()['color'] ); ?>;">
            <i class="<?php echo esc_attr( $fab_item->get_icon_class() ); ?> text-8xl" style="color: <?php echo esc_attr( $fab_item->getTemplate()['icon']['color'] ); ?>;"></i>
        </div>
    <?php endif; ?>
    <div class="fab-modal-content block">
        <?php echo do_shortcode( $content ); ?>
    </div>
</div>
<style>
    <?php if ( $iconCover ) : ?>
        .jconfirm-fab-modal-<?php echo esc_attr( $fab_item->getID() ); ?> .jconfirm-controls {
            color: <?php echo esc_attr( $fab_item->getTemplate()['icon']['color'] ); ?>;
        }
        @media only screen and (max-width: 780px) {
            .jconfirm-fab-modal-<?php echo esc_attr( $fab_item->getID() ); ?> .jconfirm-controls {
                color: inherit;
            }
        }
    <?php endif; ?>
</style>
