import type { ChangeEvent, ReactNode } from 'react'; import { ImagePlus, RefreshCcw } from 'lucide-react'; import { ResolvedAssetImage } from '../ResolvedAssetImage'; type ActionButtonProps = { icon?: ReactNode; label: string; subLabel?: string; onClick: () => void; disabled?: boolean; tone?: 'default' | 'sky' | 'green'; }; type FieldProps = { label: string; children: ReactNode; }; type TextAreaProps = { value: string; onChange: (value: string) => void; rows?: number; placeholder?: string; readOnly?: boolean; }; type SectionProps = { title: string; children: ReactNode; }; export function RpgCreationRoleVisualSection(props: { ActionButton: (props: ActionButtonProps) => ReactNode; Field: (props: FieldProps) => ReactNode; Section: (props: SectionProps) => ReactNode; TextArea: (props: TextAreaProps) => ReactNode; handleReferenceImageUpload: ( event: ChangeEvent, ) => Promise; hasGeneratedVisualPreview: boolean; isApplyingVisual: boolean; isGeneratingVisuals: boolean; previewImageSrc: string; referenceImageDataUrls: string[]; selectedTemplatePortrait?: string | null; selectedTemplateName?: string | null; syncBusy: boolean; visualPointCost: number; visualPromptText: string; visualStatus: string | null; workingRoleName: string; onClearReferenceImages: () => void; onGenerateVisuals: () => void; onVisualPromptChange: (value: string) => void; }) { const { ActionButton, Field, Section, TextArea, handleReferenceImageUpload, hasGeneratedVisualPreview, isApplyingVisual, isGeneratingVisuals, previewImageSrc, referenceImageDataUrls, selectedTemplateName, selectedTemplatePortrait, syncBusy, visualPointCost, visualPromptText, visualStatus, workingRoleName, onClearReferenceImages, onGenerateVisuals, onVisualPromptChange, } = props; return (
{previewImageSrc ? ( ) : selectedTemplatePortrait ? ( ) : (
暂无角色形象预览
)}