export function useProFeature(featureName) {
    if (!window.InvizoConfig) {
        // Fallback for local testing without WP wrapper
        return false;
    }

    const { isProActive, features } = window.InvizoConfig;
    
    // Check if the PRO plugin is strictly active, and if the requested feature flag is injected by it.
    if (isProActive && Array.isArray(features)) {
        return features.includes(featureName);
    }
    
    return false;
}
