import { TEventMap } from './types'; import Configurator from '../Configurator'; import Stater from '../Stater'; import ElState from '../Elementor/ElState'; declare class Controller { private readonly _configurator; private readonly _stater; private readonly _elState; private _eventor; constructor(manager: { configurator: Configurator; stater: Stater; elState: ElState; }); onSlideBefore: (callback: TEventMap['slideBefore']) => void; onSlideAfter: (callback: TEventMap['slideAfter']) => void; offSlideBefore: (callback: TEventMap['slideBefore']) => void; offSlideAfter: (callback: TEventMap['slideAfter']) => void; /** * reset page position (Only LoopMode) * PS: If the element is isClone then return to the position where it should actually be displayed */ slideResetToMatchIndex: () => void; /** * 包含 Clone 的 Index * @param slideIndex * @param options */ slideToSourceIndex: (slideIndex: number, options?: { isUseAnimation?: boolean; isEmitEvent?: boolean; }) => void; /** * 包含 Clone 的 Index * @param slideIndex * @param options */ slideToVirtualIndex: (slideIndex: number, options?: { isUseAnimation?: boolean; isEmitEvent?: boolean; }) => void; /** * 移動到指定頁面 * @param page * @param isUseAnimation 是否開啟動畫 * ex: slideView: 2, slideGroup: 2, total: 4 * page1 -> (1-1) * 2) + 1 + (firstIndex -1) = 1 */ slideToPage(page: number, isUseAnimation?: boolean): void; /** * 移動到下一頁 */ slideToNextPage: () => void; /** * go to previous */ slideToPrevPage: () => void; } export default Controller;