// src/renderer/components/ProBadge.tsx // Feature gate badge: renders children normally if unlocked, // shows lock overlay with PRO badge if locked. import { Box, Typography } from '@mui/material' import { Lock } from 'lucide-react' import { d3roPalette, d3roFontMono, d3roTypo, d3roRadius } from '@d3ro/ui/theme' import { useProFeature } from '../hooks/useProFeature' import { useI18n } from '@d3ro/i18n' import type { Feature } from '@d3ro/core/types' interface ProBadgeProps { feature: Feature children: React.ReactNode } export function ProBadge({ feature, children }: ProBadgeProps): React.ReactElement { const { t } = useI18n() const { unlocked, loading, showUpgrade } = useProFeature(feature) // While loading or if unlocked, render children normally if (loading || unlocked) { return <>{children} } return ( {/* Children rendered with reduced opacity */} {children} {/* Lock overlay */} {t('license.pro.required')} ) }