import React from 'react'
import { t } from '@/lib/i18n'
import type { ReviewFormController } from './useReviewFormController'
export function ReviewFormView(params: { ctrl: ReviewFormController; onCancel?: () => void }): React.ReactElement {
return (
)
}
function ReviewFormHeader(): React.ReactElement {
return {t('review.form.title')}
}
function ReviewFormFields(params: { ctrl: ReviewFormController }): React.ReactElement {
return (
<>
>
)
}
function ReviewFormActions(params: { loading: boolean; onCancel?: (() => void) | undefined }): React.ReactElement {
return (
{params.onCancel ? (
) : null}
)
}
function ErrorBox({ message }: { message: string }): React.ReactElement {
return (
{message}
)
}
function TextInput(params: {
id: string
label: string
value: string
onChange: (value: string) => void
placeholder: string
optionalLabel?: string
}): React.ReactElement {
return (
params.onChange(e.target.value)}
placeholder={params.placeholder}
className="w-full px-3 py-2 bg-cyber-darker border border-neon-cyan/30 rounded text-cyber-accent focus:border-neon-cyan focus:outline-none"
/>
)
}
function TextAreaInput(params: {
id: string
label: string
value: string
onChange: (value: string) => void
placeholder: string
rows: number
required?: boolean
requiredMark?: boolean
optionalLabel?: string
helpText?: string
}): React.ReactElement {
return (
)
}