<?php

use Assist\Pay\Helper;
use Bitrix\Main\EventManager;

require_once __DIR__ . '/vendor/autoload.php';

$eventManager = EventManager::getInstance();

$eventManager->registerEventHandler(
    'main',
    'OnAdminContextMenuShow',
    Helper::MODULE_ID,
    '\Assist\Pay\Events\MainEvent',
    'addUpdatePaymentStateButton'
);

$eventManager->registerEventHandler(
    'main',
    'OnAdminContextMenuShow',
    Helper::MODULE_ID,
    '\Assist\Pay\Events\MainEvent',
    'addConfirmPaymentButton'
);

$eventManager->registerEventHandler(
    'sale',
    'OnSalePaymentEntitySaved',
    Helper::MODULE_ID,
    '\Assist\Pay\Events\SaleEvent',
    'confirmOrderPayment'
);
