<?php
/**
 * Customer Support Sidebar Widget
 */

$support_url = 'https://wordpress.org/support/plugin/lean-cart-share-and-save/';
?>
<div class="lex-sidebar-widget lex-sidebar-widget--support">
    <div class="lex-sidebar-widget__header">
        <h3><?php echo esc_html__( 'Need Help?', 'lean-cart-share-and-save' ); ?></h3>
    </div>
    <div class="lex-sidebar-widget__content">
        <p><?php echo esc_html__( "Hi! I'm the developer behind this plugin.", 'lean-cart-share-and-save' ); ?></p>
        <p><?php echo esc_html__( 'Having an issue or a question? Feel free to reach out directly or create a support ticket.', 'lean-cart-share-and-save' ); ?></p>

        <div class="lex-sidebar-widget__contact">
            <div class="lex-sidebar-widget__contact-item">
                <span class="dashicons dashicons-email lex-sidebar-widget__contact-icon"></span>
                <strong><?php echo esc_html__( 'Email:', 'lean-cart-share-and-save' ); ?></strong>
                <span class="lex-sidebar-widget__contact-email">alberuni.work@gmail.com</span>
            </div>
            <?php
            if ( isset( $widgetRenderer ) ) {
                $widgetRenderer->renderCopyButton( 'alberuni.work@gmail.com', __( 'Copy Email', 'lean-cart-share-and-save' ), [
                    'variant' => 'primary',
                    'icon'    => 'admin-page',
                ] );
            }
            ?>
        </div>

        <a href="<?php echo esc_url( $support_url ); ?>" target="_blank" class="lex-btn lex-btn--primary lex-btn--block" style="margin-top:12px;">
            <span class="dashicons dashicons-admin-comments"></span>
            <?php echo esc_html__( 'Create Support Ticket', 'lean-cart-share-and-save' ); ?>
        </a>
    </div>
</div>
