<?php
namespace Claromentis\Pages;

$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"] ?: array()) + array("_96e55a34aef145447adf" . "6c4f7cd90c69" => base64_decode("U0VMRUNUIHBwLnRpdGxlLCBwdS5mdWxsX3VybCBGUk9NIHBhZ2VzX3VybCBwdSBJTk5FUiBKT0lOIHBhZ2VzX3BhZ2UgcHA" . "gT04gcHAudXJsX2lkID0gcHUuaWQgV0hFUkUgcHUuaWQ9aW50Omlk"), "_220161cb497f249e9fb1255" . "e5a9e5dc5" => base64_decode("L3BhZ" . "2VzLw" . "=="), "_9468bcca52266e7" . "b5b790ff2da0228d" . "e" => base64_decode("bWVud" . "Q=="), "_f87c2169aa72f2d627e17026ee" . "4f5cb4" => base64_decode("U0VMRUNUIGZ1bGxfdXJsIEZST00gcGF" . "nZXNfdXJsIFdIRVJFIGlkPWludDppZA" . "=="), "_c0697d595bc8e01" . "38f4c1ed75093c9e" . "4" => base64_decode("U0VMRUNUIHRpdGxlIEZST00gcGFnZXNfbWVudV9pdG" . "VtIFdIRVJFIGlkPWludDppZA=="), "_3f05c7e033d5fa5883b27e9248e3a" . "b53" => base64_decode("cGFnZX" . "M="), "_4d707fab93bebb00bbe69e815" . "9697c90" => base64_decode(""), "_c061ccf0f981fcfb" . "22300aa51a4ba7c5" => base64_decode("U0VMRUNUIGxpbmtfdXJsIEZST00gcGFnZXNfbWVud" . "V9pdGVtIFdIRVJFIGlkPWludDppZA=="), "_03cb77626b1b088c930db" . "80c6c10f29b" => base64_decode("U0VMRUNUIHRpdGxlIEZST00gcGFnZXNfc2l0ZSBXSEVSRSBpZD1pbnQ6" . "aWQ="), "_529b06da849c5f888162f" . "57c1a8d00fb" => base64_decode("U0VMRUNUIGZ1bGxfdXJsIEZST00gcGFnZXNfdXJsIHB1IElOTkVSIEpPSU4gcGFnZXNfc2l0ZSBwcyBPTiBwcy51cmxfaWQ9" . "cHUuaWQgV0hFUkUgcHMuaWQ9aW50Om9pZA=="), "_bf79e4758c1" . "237717f0c2dd" . "c71145d2a" => base64_decode("Ly5za" . "XRl"), "_e9a097a11de0c4" . "4de4bb98c6a9e6c" . "64b" => base64_decode("UGFnZ" . "XM="));
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["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_3f05c7e033d5fa5883b2" . "7e9248e3ab53"], $GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_e9a097a11de0c44de4bb98c6a9" . "e6c64b"]];
    }
    
    
    
    
    
    
    
    
    
    public function GetAuditObjectName($_c5eb4e7a08c3ad983e33b7ea72cd01de, $_2d876b122533fac9677b16ea6c640aa6)
    {
        if (isset(self::SITE_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($name) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_03cb77626b1b08" . "8c930db80c6c10f" . "29b"], $_2d876b122533fac9677b16ea6c640aa6);
            return $name;
        }
        if (isset(self::PAGE_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($name, $url) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_96e55a34aef145447ad" . "f6c4f7cd90c69"], $_2d876b122533fac9677b16ea6c640aa6);
            return $name ?: $url;
        }
        if (isset(self::LINK_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($name) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_c0697d595" . "bc8e0138f4" . "c1ed75093c" . "9e4"], $_2d876b122533fac9677b16ea6c640aa6);
            return $name;
        }
        if ($_c5eb4e7a08c3ad983e33b7ea72cd01de === $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_9468bcca52266e7b5b790" . "ff2da0228de"]) {
            list($name) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["_c0697d595bc8e0138f4c1ed75093c9e" . "4"], $_2d876b122533fac9677b16ea6c640aa6);
            return $name;
        }
        return null;
    }
    
    
    
    
    
    
    
    
    
    public function GetAuditObjectUrl($_c5eb4e7a08c3ad983e33b7ea72cd01de, $_2d876b122533fac9677b16ea6c640aa6)
    {
        if (isset(self::SITE_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($url) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_529b06da849c5f888162f" . "57c1a8d00fb"], $_2d876b122533fac9677b16ea6c640aa6);
            if ($url) {
                return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_220161cb497f249e9fb12" . "55e5a9e5dc5"] . $url . $GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"]["_bf79e4758c1" . "237717f0c2dd" . "c71145d2a"];
            }
        } elseif (isset(self::PAGE_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($url) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_f87c2169aa72f2d627e17026ee4f" . "5cb4"], $_2d876b122533fac9677b16ea6c640aa6);
            if ($url) {
                return $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5" . "36215"]["_220161cb497f249" . "e9fb1255e5a9e5dc" . "5"] . $url;
            }
        }
        if (isset(self::LINK_EVENTS[$_c5eb4e7a08c3ad983e33b7ea72cd01de])) {
            list($url) = Services::I()->GetDb()->query_row($GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_c061ccf0f981fcfb22300aa51a4ba" . "7c5"], $_2d876b122533fac9677b16ea6c640aa6);
            return $url;
        }
        return $GLOBALS["__65da1b1ec2d6653e8a0a" . "b7848e536215"]["_4d707fab93bebb00bbe69e8159" . "697c90"];
    }
}