import React from 'react' import { TextControl, TextareaControl } from '@wordpress/components' import { __ } from '@wordpress/i18n' import { DuplicateReports } from './DuplicateReports' import type { DuplicateReport, FeedbackDraft, FeedbackType } from '../../types/Feedback' /** What the description asks for, and an example answer, for each kind of report. */ const DESCRIPTION_COPY: Record = { bug: { label: __('What went wrong?', 'code-snippets'), placeholder: __('The editor stopped highlighting PHP and the Save button did nothing.', 'code-snippets') }, feature: { label: __('What would you like Code Snippets to do?', 'code-snippets'), placeholder: __('Let me tag snippets so I can filter large libraries by project.', 'code-snippets') }, feedback: { label: __('What is on your mind?', 'code-snippets'), placeholder: __('The new Conditions tab is much clearer, but the icons are hard to tell apart.', 'code-snippets') } } export interface ReportSummaryFieldsProps { type: FeedbackType draft: FeedbackDraft duplicates: DuplicateReport[] updateDraft: (changes: Partial) => void } export const ReportSummaryFields: React.FC = ({ type, draft, duplicates, updateDraft }) => <>
updateDraft({ title })} />
updateDraft({ description })} />