<?php

function smart_agency_magical_plugins($plugins) {
    $theme_plugins = array(
        'magical-posts-display' => array(
            'name'        => __('Posts Display', 'smart-agency'),
            'slug'        => 'magical-posts-display',
            'file'        => 'magical-posts-display/magical-posts-display.php',
            'description' => __('Display posts in beautiful layouts.', 'smart-agency'),
            'category'    => 'Content Display',
            'essential'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
        'magical-addons-for-elementor' => array(
            'name'        => __('Magical Addons', 'smart-agency'),
            'slug'        => 'magical-addons-for-elementor',
            'file'        => 'magical-addons-for-elementor/magical-addons-for-elementor.php',
            'description' => __('Premium quality addons for Elementor page builder.', 'smart-agency'),
            'category'    => 'Page Builder',
            'essential'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
        'gallery-box' => array(
            'name'        => __('Gallery Box', 'smart-agency'),
            'slug'        => 'gallery-box',
            'file'        => 'gallery-box/gallery-box.php',
            'description' => __('Beautiful gallery and lightbox plugin.', 'smart-agency'),
            'category'    => 'Media',
            'essential'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
        'click-to-top' => array(
            'name'        => __('Click To Top', 'smart-agency'),
            'slug'        => 'click-to-top',
            'file'        => 'click-to-top/click-to-top.php',
            'description' => __('One-click scroll to top button.', 'smart-agency'),
            'category'    => 'Utility',
            'essential'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
        'easy-share-solution' => array(
            'name'        => __('Easy Share', 'smart-agency'),
            'slug'        => 'easy-share-solution',
            'file'        => 'easy-share-solution/easy-share-solution.php',
            'description' => __('Easily add social sharing buttons.', 'smart-agency'),
            'category'    => 'Utility',
            'essential'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
        'wp-edit-password-protected' => array(
            'name'        => __('Password Protected', 'smart-agency'),
            'slug'        => 'wp-edit-password-protected',
            'file'        => 'wp-edit-password-protected/wp-edit-password-protected.php',
            'description' => __('Manage password protection.', 'smart-agency'),
            'category'    => 'Security',
            'essential'    => false,
            'featured'    => true,
            'is_local'    => false,
        ),
    );

    if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins')))) {
        $theme_plugins['magical-products-display'] = array(
            'name'        => __('Magical Products Display', 'smart-agency'),
            'slug'        => 'magical-products-display',
            'file'        => 'magical-products-display/magical-products-display.php',
            'description' => __('Display WooCommerce products in beautiful layouts.', 'smart-agency'),
            'category'    => 'eCommerce',
            'essential'    => false,
            'featured'    => true,
            'is_local'    => false,
        );
    }

    return array_merge($plugins, $theme_plugins);
}
add_filter('magical_plugin_activation_recommended_plugins', 'smart_agency_magical_plugins');
