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

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

    if ( $settings['button_link']['nofollow'] ) {
        $widget->add_render_attribute( 'button', 'rel', 'nofollow' );
    }
}
if ( ! empty( $settings['button_down']['url'] ) ) {
    $widget->add_render_attribute( 'button_lv2', 'href', $settings['button_down']['url'] );

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

    if ( $settings['button_down']['nofollow'] ) {
        $widget->add_render_attribute( 'button_lv2', 'rel', 'nofollow' );
    }
}
?>
<div class="pxl-pricing pxl-pricing1 <?php echo esc_attr($settings['pxl_animate']); if(!empty($settings['popular'])) { echo ' pxl-pricing-popular'; } ?>" data-wow-delay="<?php echo esc_attr($settings['pxl_animate_delay']); ?>ms">
    <div class="pxl-item-inner">
        <div class="pxl-item-content-top">
            <h5 class="pxl-item--title"><span><?php echo esc_html($settings['title']); ?></span></h5>
            <div class="pxl-item--desc"><?php echo esc_html($settings['desc']); ?></div>
            <div class="pxl-item-content">
                <div class="pxl-icon <?php echo esc_attr($settings['style_icon']); ?>">
                    <svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
                        <title>crown</title>
                        <g id="Icon">
                            <path class="s0" d="m59.5 19.3q-0.2-0.1-0.3-0.1-0.2 0-0.4 0-0.1 0-0.2 0.1-0.2 0.1-0.3 0.2l-12.1 11.9-13.3-23.2q-0.2-0.2-0.4-0.3-0.2-0.1-0.5-0.1-0.3 0-0.5 0.1-0.2 0.1-0.4 0.3l-13.3 23.2-12.1-11.9q-0.2-0.2-0.6-0.3-0.3 0-0.6 0.1-0.3 0.1-0.4 0.4-0.1 0.3-0.1 0.6l4 26.8q0 0.2 0.1 0.4 0.1 0.1 0.2 0.3 0.2 0.1 0.3 0.1 0.2 0.1 0.4 0.1h46q0.2 0 0.4-0.1 0.1 0 0.3-0.1 0.1-0.2 0.2-0.3 0.1-0.2 0.1-0.3l4-26.9q0-0.1 0-0.3 0-0.1-0.1-0.3-0.1-0.1-0.2-0.2-0.1-0.1-0.2-0.2z"/>
                        </g>
                    </svg>
                </div>
                <div class="pxl-price-time">
                    <div class="pxl-item--prev"><?php echo pxl_print_html($settings['prev']); ?></div>
                    <div class="pxl-item--price pxl-mr-12"><?php echo pxl_print_html($settings['price']); ?></div>
                    <div class="pxl-item--time"><?php echo pxl_print_html($settings['time']); ?></div>
                </div>
            </div>
        </div>
        <?php if(!empty($settings['button_text_down'])) : ?>
            <div class="pxl-button-down">
                <a class="btn-dow" <?php pxl_print_html($widget->get_render_attribute_string( 'button_lv2' )); ?>>
                    <?php echo esc_attr($settings['button_text_down']); ?>
                    <svg class="pxl-ml-10" version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
                        <title>download (1)</title>
                        <path class="s0" d="m45.1 32.6l-3.6-3.6-7 7.1v-24.3h-5v24.3l-7-7.1-3.6 3.6 13.1 13.1zm-30.1 14.6v5h34v-5z"/>
                    </svg>
                </a>
            </div>
        <?php endif; ?>
        <div class="pxl-item--meta">
            <?php if(isset($settings['feature']) && !empty($settings['feature']) && count($settings['feature'])): ?>
                <ul class="pxl-item--feature">
                    <?php foreach ($settings['feature'] as $key => $value): ?>
                        <li class="<?php echo esc_attr($value['active']); ?>">
                            <svg class="pxl-mr-12" xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"></path></svg>
                            <?php echo pxl_print_html($value['feature_text'])?>        
                        </li>
                    <?php endforeach; ?>
                </ul>
            <?php endif; ?>
            <?php if(!empty($settings['button_text'])) : ?>
                <div class="pxl-item--button">
                    <a class="pxl-button-pricing" <?php pxl_print_html($widget->get_render_attribute_string( 'button' )); ?>><?php echo esc_html($settings['button_text']); ?></a>
                </div>
            <?php endif; ?>
        </div>
    </div>
</div>