2018-11-23 17:11:50 +01:00
|
|
|
import Module from '../../__module';
|
|
|
|
import {Notifier} from '../../../../types/api';
|
2018-11-10 13:47:25 +01:00
|
|
|
import {ConfirmNotifierOptions, NotifierOptions, PromptNotifierOptions} from 'codex-notifier';
|
|
|
|
|
|
|
|
export default class NotifierAPI extends Module {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Available methods
|
|
|
|
*/
|
2018-11-23 17:11:50 +01:00
|
|
|
get methods(): Notifier {
|
2018-11-10 13:47:25 +01:00
|
|
|
return {
|
|
|
|
show: (options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions) => this.show(options),
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public show(options: NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions) {
|
|
|
|
return this.Editor.Notifier.show(options);
|
|
|
|
}
|
|
|
|
}
|