McpPromoBanner.js
| 1 | import { __ } from '@wordpress/i18n'; |
| 2 | import { Sparkles } from 'lucide-react'; |
| 3 | import PromoBanner from './PromoBanner'; |
| 4 | |
| 5 | export const MCP_PROMO_KEY = 'prestoPlayerMcpPromoDismissed'; |
| 6 | |
| 7 | const EXAMPLES = [ |
| 8 | __( 'Create a video from a link', 'presto-player' ), |
| 9 | __( 'Ask for your video analytics', 'presto-player' ), |
| 10 | ]; |
| 11 | |
| 12 | /** |
| 13 | * Promo showcasing the AI capabilities. Placement and gating live in |
| 14 | * DashboardPromos — this is just the copy. |
| 15 | * |
| 16 | * @param {Object} props |
| 17 | * @param {Function} props.onDismiss Called after the dismissal is stored. |
| 18 | */ |
| 19 | const McpPromoBanner = ( { onDismiss } ) => ( |
| 20 | <PromoBanner |
| 21 | storageKey={ MCP_PROMO_KEY } |
| 22 | onDismiss={ onDismiss } |
| 23 | icon={ |
| 24 | <Sparkles className="size-5 text-brand-primary-600" aria-hidden="true" /> |
| 25 | } |
| 26 | title={ __( 'Explore Presto Player AI Abilities', 'presto-player' ) } |
| 27 | chips={ EXAMPLES } |
| 28 | ctaLabel={ __( 'Set up AI', 'presto-player' ) } |
| 29 | ctaHref={ `${ window.location.pathname }?page=presto-dashboard&tab=Settings§ion=mcp` } |
| 30 | /> |
| 31 | ); |
| 32 | |
| 33 | export default McpPromoBanner; |
| 34 |