<?php

    return array(
        'hooks'    => array(
            array(
                'event'    => 'afterBasicFormValidation',
                'callback' => 'Extension\VisitorBlocker\VisitorBlocker@globalShield',
                'priority' => 102,
            ),
            array(
                'event' => 'afterBasicFormValidation',
                'callback' => "Extension\\VisitorBlocker\\BlacklistService@captureCrmPayload",
                'priority' => 100,
            ),
            array(
                'event'    => 'afterBasicFormValidation',
                'callback' => 'Extension\VisitorBlocker\VisitorBlocker@checkTimeBasedDecline',
                'priority' => 100,
            ),
            array(
                'event'    => 'afterBasicFormValidation',
                'callback' => 'Extension\VisitorBlocker\VisitorBlocker@checkLocalRepeatOrders',
                'priority' => 100,
            ),
            array(
                'event'    => 'afterBasicFormValidation',
                'callback' => 'Extension\VisitorBlocker\VisitorBlocker@countryBlocking',
                'priority' => 100,
            ),
            array(
                'event'    => 'afterBasicFormValidation',
                'callback' => 'Extension\VisitorBlocker\VisitorBlocker@localBlacklist',
                'priority' => 101,
            ),
            array(
                'event'    => 'beforeAnyCrmRequest',
                'callback' => "Extension\\VisitorBlocker\\VisitorBlocker@init",
                'priority' => 102,
            ),
             array(
                'event'    => 'beforeAnyCrmRequest',
                'callback' => "Extension\\VisitorBlocker\\VisitorBlocker@checkAddressBlock",
                'priority' => 100,
            ),
            array(
                'event'    => 'afterAnyCrmRequest',
                'callback' => "Extension\\VisitorBlocker\\VisitorBlocker@increaseDeclineCount",
                'priority' => 1000,
            ),
            array(
                'event'    => 'afterAnyPreauthDecline',
                'callback' => "Extension\\VisitorBlocker\\VisitorBlocker@increaseDeclineCount",
                'priority' => 100,
            ),
            array(
                'event' => 'beforeBodyTagClose',
                'callback' => "Extension\\VisitorBlocker\\VisitorBlocker@filterhostname",
                'priority' => 110,
            ),
            array(
                'event' => 'afterAnyCrmRequest',
                'callback' => "Extension\\VisitorBlocker\\VisitorBlocker@getGatewayId",
                'priority' => 1001,
            ),            
            array(
                'event' => 'afterAnyCrmRequest',
                'callback' => "Extension\\VisitorBlocker\\RedirectUsers@increaseIPLimitCount",
                'priority' => 1002,
            ),
            array(
                'event' => 'pageLoad',
                'callback' => "Extension\\VisitorBlocker\\RedirectUsers@checkIPLimit",
                'priority' => 100,
            ),
        ),
        'custom_html' => array(
            'template_js' => 'js/visitorBlocker.js',
            'enable' => true,
            'template_name' => 'html/visitorBlocker.html'
        ),
        'actions'  => array(
            'activate'   => "Extension\\VisitorBlocker\\BlacklistService@pullData",
            'deactivate' => '',
            'save'       => 'Extension\\VisitorBlocker\\VisitorBlocker@save',
        ),
        'settings' => array(
            array(
                'label' => 'dummy',
                'key'   => 'dummy',
                'type'  => 'boolean',
                'value' => false,
            ),
        )
    );