<?php

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

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