import type { FilterSpeaker, LabelValue } from '../model'; import type { IEditorConfig } from '@wangeditor/editor'; import type { FilterBarSearch } from '../components/bar-search'; import type { Speaker } from '../model'; import { type AudioInfo } from '../menu/conversion-menu/data'; import type { CancellationToken } from '../utils'; import { type RecentUsageSpeaker } from '../menu/management-menu/data'; type Animation = { zoom: boolean; grayscale: boolean; }; type FetchFunction = () => Promise; type WordFetchFunction = (word: string) => Promise; type FilterFetchFunction = (filter: FilterBarSearch) => Promise; type FilterSpeakerFetchFunction = (filter: FilterSpeaker) => Promise; type PartialKey = 'animation' | 'bgm' | 'special' | 'tryPlay' | 'conversion' | 'management' | 'editorConfig'; type PartialProps = { [P in K]?: Partial; }; export type PartialSSMLEditorConfig = Partial> & PartialProps; export interface SSMLEditorConfig { animation: Animation; editorConfig: Partial & { saveHtml?: (htmlGetter: () => string) => Promise; readHtml?: () => Promise; autoSave: boolean; autoSaveWait: number; }; handleWarn: (message: string) => void; handleError: (error: unknown) => void; pinyin: {}; english: { fetchData: WordFetchFunction; }; bgm: { menus: LabelValue[]; fetchScene: FetchFunction; fetchStyle: FetchFunction; fetchData: FilterFetchFunction; }; special: { menus: LabelValue[]; fetchScene: FetchFunction; fetchStyle: FetchFunction; fetchData: FilterFetchFunction; }; tryPlay: { play: (ssmlGetter: () => string) => Promise; gender: LabelValue[]; topFlag: LabelValue[]; category: LabelValue[]; style: LabelValue[]; emotion: LabelValue[]; fetchData: FilterSpeakerFetchFunction; featchTag: FetchFunction; fetchStar: (speaker: string, star: boolean) => Promise; selectSpeaker?: (speaker: Speaker, setter: (speaker: Speaker) => void) => void; }; conversion: { timeoutMilliseconds: number; audioUpload: (file: File, token: CancellationToken) => Promise; transfer: (opt: { audioId: string; speakerId: string; }) => Promise; fetchSpeaker: () => Promise; }; management: { recordRecentUsage: (recentUsage: RecentUsageSpeaker) => Promise; fetchRecentUsage: () => Promise; deleteRecentUsage: (id?: string) => Promise; }; } export declare function setConfig(key: symbol, partConfig?: PartialSSMLEditorConfig): void; export declare function getConfig(key: symbol): SSMLEditorConfig; export {};