import type { AnswerType } from './types'; import { SubjectError, type TagItem } from './subject-shared'; export interface SingleAnswer { title: string; isCorrect: boolean; customAnswerId?: string | number; answerId?: string | number; resultItem?: string; orderIndex?: number; answerRelations?: any[]; relationType?: number | null; [key: string]: any; } export interface SingleSnapshot { title: string; answers: SingleAnswer[]; analysis: string; leastAnswerCount: number | null; selectedTagList: TagItem[]; examExpand: string; showRichText: boolean; richText: string; orderList: string[]; } export interface SingleEditorState { title: string; analysis: string; leastAnswerCount: number | null; answerCheckType: number; isKey: boolean; selectedTagList: TagItem[]; categoryId: string; richText: string; showRichText: boolean; answers?: SingleAnswer[]; orderList?: string[]; } export interface SingleValidationResult { errors: SubjectError[]; isSetCorrectAnswer: boolean; correctAnswerCount: number; } export declare function createDefaultSingleAnswers(): SingleAnswer[]; export declare function supportsLeastAnswerCount(answerType: AnswerType): answerType is "sort" | "multiple"; export declare function normalizeLeastAnswerCount(value: unknown, answerType: AnswerType): number | null; export declare function leastAnswerCountSuffix(value: number | null, answerType: AnswerType): string; export declare function normalizeSingleAnswerItem(answer: any): SingleAnswer; export declare function normalizeSingleAnswerList(value: unknown): SingleAnswer[]; export declare function resolveSingleOrderList({ examExpand, answers, labelForIndex, }: { examExpand?: string; answers?: any[]; labelForIndex: (index: number) => string; }): string[]; export declare function buildSingleEditorState({ answerType, title, analysis, leastAnswerCount, answerCheckType, isKey, tagList, categoryId, richTextContent, answerList, examExpand, labelForIndex, includeOrderList, }: { answerType: AnswerType; title?: string; analysis?: string; leastAnswerCount?: unknown; answerCheckType?: number; isKey?: boolean; tagList?: unknown; categoryId?: unknown; richTextContent?: string; answerList?: unknown; examExpand?: string; labelForIndex: (index: number) => string; includeOrderList?: boolean; }): SingleEditorState; export declare function buildSingleSnapshot({ answerType, title, answers, analysis, leastAnswerCount, selectedTagList, examExpand, showRichText, richText, orderList, sortAnswerValue, }: { answerType: AnswerType; title?: string; answers?: any[]; analysis?: string; leastAnswerCount?: unknown; selectedTagList?: TagItem[]; examExpand?: string; showRichText?: boolean; richText?: string; orderList?: string[]; sortAnswerValue?: (letter: string) => string | number; }): SingleSnapshot; export declare function validateSingleSnapshot(snapshot: SingleSnapshot, answerType: AnswerType, row?: any): SingleValidationResult; export declare function serializeSingleSnapshot(snapshot: SingleSnapshot, { answerType, isSetCorrectAnswer, examAnswerRelationType, customId, }: { answerType: AnswerType; isSetCorrectAnswer: boolean; examAnswerRelationType?: number; customId?: string; }): any;