2022-09-11 11:42:40 -07:00
|
|
|
import registerEvents from 'retrospring/utilities/registerEvents';
|
|
|
|
import { enableHandler } from './enable';
|
|
|
|
import { dismissHandler } from "./dismiss";
|
2023-01-05 02:08:13 -08:00
|
|
|
import { unsubscribeHandler } from "retrospring/features/webpush/unsubscribe";
|
2022-09-11 11:42:40 -07:00
|
|
|
|
|
|
|
export default (): void => {
|
2023-01-05 02:08:13 -08:00
|
|
|
registerEvents([
|
|
|
|
{type: 'click', target: '[data-action="push-enable"]', handler: enableHandler, global: true},
|
|
|
|
{type: 'click', target: '[data-action="push-dismiss"]', handler: dismissHandler, global: true},
|
|
|
|
{type: 'click', target: '[data-action="push-disable"]', handler: unsubscribeHandler, global: true},
|
|
|
|
{
|
|
|
|
type: 'click',
|
|
|
|
target: '[data-action="push-remove-all"]',
|
|
|
|
handler: unsubscribeHandler,
|
|
|
|
global: true
|
|
|
|
},
|
|
|
|
]);
|
2022-09-11 11:42:40 -07:00
|
|
|
}
|