<?php
namespace Claromentis\Pages;

$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab78" . "48e536215"] ?: array()) + array("_f87c2169aa72f2d627e" . "17026ee4f5cb4" => base64_decode("U0VMRUNUIGZ1bGxfdX" . "JsIEZST00gcGFnZXNf" . "dXJsIFdIRVJFIGlkPW" . "ludDppZA=="), "_03cb77626b1b" . "088c930db80c6" . "c10f29b" => base64_decode("U0VMRUNUIHRpdGxlIEZST00gcGFnZXNfc2l0ZSBXSEVSR" . "SBpZD1pbnQ6aWQ="), "_3f05c7e033d5fa5883b27e9248" . "e3ab53" => base64_decode("cGFnZXM" . "="), "_c0697d595bc8e0138f4c1ed7" . "5093c9e4" => base64_decode("U0VMRUNUIHRpdGxlIEZST00gcGFnZXNfb" . "WVudV9pdGVtIFdIRVJFIGlkPWludDppZA" . "=="), "_e9a097a11de0c44de4bb98c" . "6a9e6c64b" => base64_decode("UGFnZXM" . "="), "_529b06da849c5f888162f57c1a8d" . "00fb" => base64_decode("U0VMRUNUIGZ1bGxfdXJsIEZST00gcGFnZXNfdXJsIHB1IElOTkVSIEpPSU4gcGFnZXNfc2l0ZSBwcyBPTiBwcy51cmxfaWQ9c" . "HUuaWQgV0hFUkUgcHMuaWQ9aW50Om9pZA=="), "_4d707fab93bebb00bbe69e8159697c9" . "0" => base64_decode(""), "_c061ccf0f" . "981fcfb223" . "00aa51a4ba" . "7c5" => base64_decode("U0VMRUNUIGxpbmtfdXJsIEZST00gcGFnZXNfbWVudV9pdGVtIFdIRVJFIGlkPWlu" . "dDppZA=="), "_9468bcca52266e7b5b790ff2d" . "a0228de" => base64_decode("bWVudQ" . "=="), "_220161cb497f249e9fb1255e5a9e5d" . "c5" => base64_decode("L3BhZ2VzL" . "w=="), "_bf79e4758c1237717f0c2dd" . "c71145d2a" => base64_decode("Ly5zaX" . "Rl"), "_96e55a34aef145447ad" . "f6c4f7cd90c69" => base64_decode("U0VMRUNUIHBwLnRpdGxlLCBwdS5mdWxsX3VybCBGUk9NIHBhZ2VzX3VybCBwdSBJTk5FUiBKT0lOIHB" . "hZ2VzX3BhZ2UgcHAgT04gcHAudXJsX2lkID0gcHUuaWQgV0hFUkUgcHUuaWQ9aW50Omlk"));
use Claromentis\Core\Audit\ApplicationAuditConfig;
use Claromentis\Core\Audit\ApplicationAuditUrlConfig;
use Claromentis\Core\Services;




class PagesAuditConfig implements ApplicationAuditConfig, ApplicationAuditUrlConfig
{
    const PAGE_EVENTS = ['add_page' => 'Add page', 'edit_page' => 'Change page properties', 'move_page' => 'Change page URL', 'checkout' => 'Checkout page', 'checkin' => 'Checkin page', 'delete_page' => 'Delete page', 'view_page' => 'View page', 'view_as_home' => 'View as home page'];
    const SITE_EVENTS = ['add_site' => 'Add site', 'edit_site' => 'Change site properties', 'move_site' => 'Change site URL', 'delete_site' => 'Delete site'];
    const LINK_EVENTS = ['add_link' => 'Add link', 'edit_link' => 'Edit link', 'delete_link' => 'Delete link'];
    const OTHER_EVENTS = ['menu' => 'Site menu change', 'top_perms' => 'Change top level rights'];
    
    
    
    
    
    
    
    public function GetAuditEvents()
    {
        return self::PAGE_EVENTS + self::SITE_EVENTS + self::LINK_EVENTS + self::OTHER_EVENTS;
    }
    
    
    
    
    
    
    
    public function GetAuditApplication()
    {
        return [$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_3f05c7e033d5fa5883b27e924" . "8e3ab53"], $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_e9a097a11de0c44de4bb" . "98c6a9e6c64b"]];
    }
    
    
    
    
    
    
    
    
    
    public function GetAuditObjectName($_c5eb4e7a08c3ad983e33b7ea72cd01de, $_2d876b122533fac9677b16ea6c640aa6)
    {
        if (isset(self::SITE_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($name) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_03cb77626" . "b1b088c930" . "db80c6c10f" . "29b"], $_2d876b122533fac9677b16ea6c640aa6);
            return $name;
        }
        if (isset(self::PAGE_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($name, $url) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_96e55a34aef145447adf6c4f7c" . "d90c69"], $_2d876b122533fac9677b16ea6c640aa6);
            return $name ?: $url;
        }
        if (isset(self::LINK_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($name) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_c0697d595bc8e0138f" . "4c1ed75093c9e4"], $_2d876b122533fac9677b16ea6c640aa6);
            return $name;
        }
        if ($_c5eb4e7a08c3ad983e33b7ea72cd01de === $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_9468bcca52266e7b5b790f" . "f2da0228de"]) {
            list($name) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_c0697d59" . "5bc8e0138" . "f4c1ed750" . "93c9e4"], $_2d876b122533fac9677b16ea6c640aa6);
            return $name;
        }
        return null;
    }
    
    
    
    
    
    
    
    
    
    public function GetAuditObjectUrl($_c5eb4e7a08c3ad983e33b7ea72cd01de, $_2d876b122533fac9677b16ea6c640aa6)
    {
        if (isset(self::SITE_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($url) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_529b06da849c5f888162f57" . "c1a8d00fb"], $_2d876b122533fac9677b16ea6c640aa6);
            if ($url) {
                return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_220161cb497f249e" . "9fb1255e5a9e5dc5"] . $url . $GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_bf79e4758c1" . "237717f0c2dd" . "c71145d2a"];
            }
        } elseif (isset(self::PAGE_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($url) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_f87c2169aa72f" . "2d627e17026ee4" . "f5cb4"], $_2d876b122533fac9677b16ea6c640aa6);
            if ($url) {
                return $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_220161cb" . "497f249e9" . "fb1255e5a" . "9e5dc5"] . $url;
            }
        }
        if (isset(self::LINK_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($url) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_c061ccf0f9" . "81fcfb22300" . "aa51a4ba7c5"], $_2d876b122533fac9677b16ea6c640aa6);
            return $url;
        }
        return $GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_4d707fab93bebb00" . "bbe69e8159697c90"];
    }
}