import React from 'react'; import { __ } from '@wordpress/i18n'; import { Progress, ScoreRing } from './ui'; /** * The screen before its first run — same hero as after it. * * A screen that has never run used to be one sentence in a card, and beside * the dashboard's hero it looked broken rather than new. This is the same * shape with the numbers still empty: the ring says "not yet", the sentence * says what the first run does, the button starts it, and the four tiles * name what will be measured. Below it, the steps that stand between now and * the first result, each with its state. * * @param {object} props * @param {string} props.badge Short state, e.g. "Not run yet". * @param {string} props.title What the first run does, in one sentence. * @param {string} props.why Why it matters. * @param {string} [props.action] Primary button label. * @param {Function} [props.onAction] * @param {boolean} [props.busy] * @param {boolean} [props.disabled] * @param {string} [props.ringLabel] * @param {Array<{label: string, hint?: string}>} props.stats The four measures. * @param {Array<{label: string, detail?: string, done: boolean, action?: string, onAction?: Function}>} [props.steps] * @param {Array<{title: string, text: string}>} [props.previews] What the screen will show. */ export default function FirstRun({ badge = __('Not run yet', 'ai-rank-suite'), title, why, action, onAction, busy = false, disabled = false, ringLabel = 'Score', stats = [], steps = [], previews = [], progress = null }) { const next = steps.find((s) => !s.done); return (
{why}