2020-01-17 23:37:52 +03:00
|
|
|
import { Action as ReduxPopup } from 'redux';
|
2019-12-07 13:28:52 +02:00
|
|
|
import { PopupConfig } from './reducer';
|
|
|
|
|
2020-01-17 23:37:52 +03:00
|
|
|
interface PopupCreateAction extends ReduxPopup {
|
2020-05-24 02:08:24 +03:00
|
|
|
type: 'POPUP_CREATE';
|
|
|
|
payload: PopupConfig;
|
2020-01-17 23:37:52 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export function create(popup: PopupConfig): PopupCreateAction {
|
2020-05-24 02:08:24 +03:00
|
|
|
return {
|
|
|
|
type: 'POPUP_CREATE',
|
|
|
|
payload: popup,
|
|
|
|
};
|
2019-12-07 13:28:52 +02:00
|
|
|
}
|
|
|
|
|
2020-01-17 23:37:52 +03:00
|
|
|
interface PopupDestroyAction extends ReduxPopup {
|
2020-05-24 02:08:24 +03:00
|
|
|
type: 'POPUP_DESTROY';
|
|
|
|
payload: PopupConfig;
|
2020-01-17 23:37:52 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
export function destroy(popup: PopupConfig): PopupDestroyAction {
|
2020-05-24 02:08:24 +03:00
|
|
|
return {
|
|
|
|
type: 'POPUP_DESTROY',
|
|
|
|
payload: popup,
|
|
|
|
};
|
2019-12-07 13:28:52 +02:00
|
|
|
}
|
2020-01-17 23:37:52 +03:00
|
|
|
|
|
|
|
export type Action = PopupCreateAction | PopupDestroyAction;
|