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'; type Effects = { zoom: boolean; grayscale: boolean; }; type FetchFunction = () => Promise; type WordFetchFunction = (word: string) => Promise; type FilterFetchFunction = (filter: FilterBarSearch) => Promise; type FilterSpeakerFetchFunction = (filter: FilterSpeaker) => Promise; type PartialKey = 'effects' | 'bgm' | 'special' | 'tryPlay' | 'conversion' | 'management'; type PartialProps = { [P in K]?: Partial; }; export type PartialSSMLEditorConfig = Partial> & PartialProps; export interface SSMLEditorConfig { effects: Effects; editorConfig: Partial & { placeholder: string; }; 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[]; category: 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: {}; } export declare function setConfig(config?: PartialSSMLEditorConfig): void; export declare function getConfig(): SSMLEditorConfig; export {};