import React from 'react' import { __ } from '@wordpress/i18n' import classnames from 'classnames' import { Button } from '../../common/Button' interface DemoPromptBoxProps { value: string submitLabel: string placeholder: string /** Whether the caret should blink at the end of the text. */ typing: boolean /** Whether the walkthrough is clicking the send button right now. */ pressed?: boolean /** Whether the agent is busy, as it is whenever the script is mid-step. */ disabled?: boolean } /** * A read-only stand-in for the AI Agent's prompt box. The demo drives the text, * so this renders a div rather than a textarea: nothing here accepts input. */ export const DemoPromptBox: React.FC = ({ value, submitLabel, placeholder, typing, pressed = false, disabled = false }) =>
{'' === value ? {placeholder} : value} {typing &&
{__('Enter to send · Shift/Ctrl/⌘+Enter for a new line', 'code-snippets')}