<?php 
if ( ! empty( $settings['btn_link']['url'] ) ) {
    $widget->add_render_attribute( 'button', 'href', $settings['btn_link']['url'] );

    if ( $settings['btn_link']['is_external'] ) {
        $widget->add_render_attribute( 'button', 'target', '_blank' );
    }

    if ( $settings['btn_link']['nofollow'] ) {
        $widget->add_render_attribute( 'button', 'rel', 'nofollow' );
    }
}
if ( ! empty( $settings['btn_link2']['url'] ) ) {
    $widget->add_render_attribute( 'button2', 'href', $settings['btn_link2']['url'] );

    if ( $settings['btn_link2']['is_external'] ) {
        $widget->add_render_attribute( 'button2', 'target', '_blank' );
    }

    if ( $settings['btn_link2']['nofollow'] ) {
        $widget->add_render_attribute( 'button2', 'rel', 'nofollow' );
    }
}
if ( ! empty( $settings['btn_link3']['url'] ) ) {
    $widget->add_render_attribute( 'button3', 'href', $settings['btn_link3']['url'] );

    if ( $settings['btn_link3']['is_external'] ) {
        $widget->add_render_attribute( 'button3', 'target', '_blank' );
    }

    if ( $settings['btn_link3']['nofollow'] ) {
        $widget->add_render_attribute( 'button3', 'rel', 'nofollow' );
    }
}
?>
<div class="pxl-showcase pxl-showcase3 pxl-hover-parallax <?php echo pxl_print_html($settings['_style'])?> <?php if($settings['active'] == 'yes' && !empty($settings['active_label']) && empty($settings['btn_text'])) { echo 'pxl-wg-active'; } ?>">
    <div class="pxl-item--inner">
        <div class="pxl-dot">
            <svg xmlns="http://www.w3.org/2000/svg" width="35" height="8" viewBox="0 0 35 8" fill="none">
                <ellipse cx="4" cy="4" rx="4" ry="4" fill="#0D0C0C" fill-opacity="0.1"/>
                <ellipse cx="17.3333" cy="4" rx="4" ry="4" fill="#0D0C0C" fill-opacity="0.1"/>
                <ellipse cx="30.6667" cy="4" rx="4" ry="4" fill="#A234FD"/>
            </svg>
        </div>
        <?php if(!empty($settings['image']['id'])) :
            $img = pxl_get_image_by_size( array(
                'attach_id'  => $settings['image']['id'],
                'thumb_size' => '588x650',
            ));
            $thumbnail = $img['thumbnail']; ?>
            <div class="pxl-item--image">
                <?php echo pxl_print_html($thumbnail); ?>
                <div class="pxl-btn">
                    <?php if(!empty($settings['btn_text'])) : ?>
                        <div class="pxl-item--readmore">
                            <a class="btn pxl-icon-active btn-block-inline btn-icon-box4 light" <?php pxl_print_html($widget->get_render_attribute_string( 'button' )); ?>>
                                <span class="pxl--btn-text">
                                    <?php echo esc_html($settings['btn_text']); ?>
                                </span>
                                <div class="pxl--btn-icon">
                                    <i aria-hidden="true" class="flaticon flaticon-next"></i>                                
                                </div>
                            </a>
                        </div>
                    <?php endif; ?>
                    <?php if(!empty($settings['btn_text2'])) : ?>
                        <div class="pxl-item--readmore">
                            <a class="btn pxl-icon-active btn-block-inline btn-icon-box4 dark" <?php pxl_print_html($widget->get_render_attribute_string( 'button2' )); ?>>
                                <span class="pxl--btn-text">
                                    <?php echo esc_html($settings['btn_text2']); ?>
                                </span>
                                <div class="pxl--btn-icon">
                                    <i aria-hidden="true" class="flaticon flaticon-next"></i>                                
                                </div>
                            </a>
                        </div>
                    <?php endif; ?> 
                    <?php if(!empty($settings['btn_text3'])) : ?>
                        <div class="pxl-item--readmore">
                            <a class="btn pxl-icon-active btn-block-inline btn-icon-box4 light" <?php pxl_print_html($widget->get_render_attribute_string( 'button3' )); ?>>
                                <span class="pxl--btn-text">
                                    <?php echo esc_html($settings['btn_text3']); ?>
                                </span>
                                <div class="pxl--btn-icon">
                                    <i aria-hidden="true" class="flaticon flaticon-next"></i>                                
                                </div>
                            </a>
                        </div>
                    <?php endif; ?>      
                </div>
            </div>
        <?php endif; ?>
        <?php if (!empty($settings['title']) && $settings['_style'] !== 'style-2') : ?>
            <div class="pxl-item--title">
                <cite><?php echo esc_html($settings['title']); ?></cite> 
                <?php echo esc_html__('Home Page', 'aimo'); ?>
            </div>
        <?php elseif ($settings['_style'] === 'style-2') : ?>
            <div class="pxl-item--title">
                <?php echo esc_html__('Coming Soon', 'aimo'); ?>
            </div>
        <?php endif; ?>

        <?php if($settings['active'] == 'yes' && !empty($settings['active_label']) && empty($settings['btn_text'])) : ?>
            <div class="pxl-item--label"><?php echo esc_html($settings['active_label']); ?></div>
        <?php endif; ?>
    </div>
</div>




