import { WaitingOverlay } from '@auto-launch/components/Waiting'; import { ActionButton, SecondaryButton } from '@auto-launch/templates/button'; import { forwardRef } from '@wordpress/element'; import { pencil } from '@wordpress/icons'; import classNames from 'classnames'; export const DescriptionForm = ({ showTitle, title, onTitleChange, description, onDescriptionChange, descriptionRef, placeholder, submitLabel, submitDisabled, onSubmit, showEnhance, enhanceDisabled, onEnhance, consentTerms, waiting, waitingMessage, strings, autoFocus = true, }) => ( <> {/* biome-ignore lint: allow onClick without keyboard */}
descriptionRef?.current?.focus()} className="relative flex w-full flex-col gap-ui-section" aria-busy={waiting} > {showTitle && ( )}
{showTitle && }
{showEnhance && ( )}
); export const TitleField = ({ value, onChange, autoFocus, label, placeholder, }) => (
e.stopPropagation()} onChange={(e) => onChange?.(e.target.value)} placeholder={placeholder} />
); export const DescriptionLabel = ({ label }) => ( ); export const DescriptionField = forwardRef( ({ value, onChange, placeholder, autoFocus }, ref) => (