<div x-data="dashboard" class="addons-container ssgsw-wrapper" >
    <div>
        <!-- Add-ons Section -->
        <h2><?php esc_html_e('Add-ons','stock-sync-with-google-sheet-for-woocommerce');?></h2>
        <p><?php esc_html_e('Add your favorite add-ons and supercharge your workflow','stock-sync-with-google-sheet-for-woocommerce');?></p>
        <div class="addons-grid">
            <!-- Add-on Card 1 -->
            <div class="addon-card">
                <?php 
	                $flex_image = SSGSW_PUBLIC . 'images/multi-vendor.svg';
                ?>
                <div class="header_wrapper_addon">
                    <img src="<?php echo esc_url($flex_image);?>" class="ssgsw_vendor_icon">
                    <h3 class="header_title_ssgsw"><?php esc_html_e('Multi-vendor Addon','stock-sync-with-google-sheet-for-woocommerce');?></h3>
                 </div>
                <p class="ssgsw_addon_extra"><?php esc_html_e('Power up your multi-vendor experience with Dokan, WCFM, MultivendorX, etc. This allows your multi-vendors to manage their inventory to sync with Google Sheets.','stock-sync-with-google-sheet-for-woocommerce');?></p>
                <div class="addon-status">
                    <p x-show="isVendorActive"><?php esc_html_e('Activated','stock-sync-with-google-sheet-for-woocommerce');?></p>
                    <?php 
                        $plugin_basename = 'multivendor-addon-for-flexstock/multivendor-addon-for-flexstock.php'; // Your plugin's basename
                        $action_name = 'activate_plugin_' . sanitize_title($plugin_basename); // Unique action name
                        $activation_url = wp_nonce_url(
                            admin_url('admin.php?page=ssgsw-add-ons&action=' . $action_name . '&plugin=' . urlencode($plugin_basename)),
                            $action_name
                        );

                    ?>
                    <a class="button upgrade_active_now" href="<?php echo esc_url($activation_url);?>" x-show="isVendorInstall && !isVendorActive "><?php esc_html_e('Activate Now','stock-sync-with-google-sheet-for-woocommerce');?></a>
                    
                    <a href="<?php echo esc_url(home_url('/wp-admin/admin.php?page=ssgsw-multivendor'));?>" class="ssgsw_setting_button" x-show="isVendorActive" ><?php esc_html_e('Settings','stock-sync-with-google-sheet-for-woocommerce');?><span class="dashicons dashicons-arrow-right-alt ssgsw_setting_color"></span></a>   
                    
                </div>
                <a x-show="!isVendorInstall"  class="upgrade_to_platinam_button" style="display: none;" href="https://lnk.wppool.dev/dCt3UAh" target="_blank"><?php esc_html_e('Get Now','stock-sync-with-google-sheet-for-woocommerce');?> <span class="dashicons dashicons-arrow-right-alt"></span></a>
            </div>

             <?php
                $multi_store_plugin_active = apply_filters('ssgsw_is_multistore_plugin_active', false);
                if ($multi_store_plugin_active) {
                    do_action('ssgsw_render_multistore_addon_card');
                } else {
                    ?>
                    <div class="addon-card">
                        <?php 
                            $flex_image = SSGSW_PUBLIC . 'images/multi-vendor.svg';
                        ?>
                        <div class="header_wrapper_addon">
                            <img src="<?php echo esc_url($flex_image);?>" class="ssgsw_vendor_icon">

                            <h3 class="header_title_ssgsw"><?php esc_html_e('Multi-Store Addon','stock-sync-with-google-sheet-for-woocommerce');?></h3>
                        </div>
                        <p class="ssgsw_addon_extra"><?php esc_html_e('This plugin integrates with external websites to gather their data and intelligently merge it into a unified Google Sheet, giving you a comprehensive overview from a single source.','stock-sync-with-google-sheet-for-woocommerce');?></p>
                        <div class="addon-status">
                            <a class="upgrade_to_platinam_button" href="https://wppool.dev/flexstock/addons/" target="_blank">🎉<?php esc_html_e('Coming Soon','stock-sync-with-google-sheet-for-woocommerce'); ?></a>
                        </div>
                    </div>
                    <?php
                }
            ?>
            <!-- Add-on Card 3 -->
        </div>

    </div>
</div>
