<?php

	namespace Mocha\UI\Pages;
	
	use Phast\RenderingEventArgs;
	use Phast\System;
	use Phast\WebPage;

	class TenantConfigurationPage extends WebPage
	{
		protected function OnInitializing(\Phast\CancelEventArgs $e)
		{
			header("Content-Type: application/xml");

			$tenant = System::GetTenantName();
			
			$dict = array();
			echo("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
			echo("<mul:Tenant_Config xmlns:mml=\"urn:net.alcetech.schemas.Mocha.Model!1.0\" xmlns:mul=\"urn:net.alcetech.schemas.Mocha.UserInterface!1.0\" xmlns:mcl=\"urn:net.alcetech.schemas.Mocha.UserInterface!2.0\" xmlns:mc=\"urn:net.alcetech.schemas.Mocha/bsvc\" xmlns:nyw=\"urn:com.netyourwork/aod\" ");

										
			$dict["Allow_Attachments_And_Documents_To_Be_Shared_With_Other_Mobile_Apps"] = "0";
			$dict["Apns_Allowed"] = "0";
			$dict["Canvas_Is_Enabled"] = "1";
			$dict["Canvas_Hex_Code"] = "#005cb9,#0875e1";
			$dict["Clear_Mobile_SSO_Webview_Cookies_on_Login"] = "0";
			$dict["Deter_Screenshots"] = "0";
			$dict["Disable_Add_To_Contact"] = "0";
			$dict["Disable_Importing_Attachments_From_Third-Party_Cloud_Services"] = "0";
			$dict["Disable_Location_Service"] = "0";
			$dict["Disable_Mail_To"] = "0";
			$dict["Disable_Voice_in_Assistant_on_Mobile"] = "1";
			$dict["Enable_Blue_Primary_Buttons"] = "0";
			$dict["Enable_Certificate_Based_SSO"] = "0";
			$dict["Enable_DOM_Storage"] = "0";
			$dict["Enable_Email_Annotations"] = "1";
			$dict["Enable_export_to_Worksheets"] = "1";
			$dict["Enable_Fingerprint_Authentication"] = "1";
			$dict["Enable_Geospace_Visualization"] = "0";
			$dict["Enable_Mobile_Browser_SSO_for_Native_Apps"] = "0";
			$dict["Enable_New_Profile"] = "0";
			$dict["Error_Message_for_Browser"] = "This Browser is not supported by Workday. Please contact your IT department.";
			$dict["Is_FedRAMP_Tenant"] = "0";
			$dict["Google_Cloud_Messaging_Project_Number"] = "739632724832";
			$dict["Hide_Links_to_Web_from_Deep_Linking_and_Inbox"] = "0";
			$dict["Login_URL"] = System::ExpandPhysicalPath(System::ExpandRelativePath("~" . System::GetLoginPageUrl()));// "https://wd5-impl.workday.com/wday/authgwy/cityoforlando1/login-saml2.htmld";
			$dict["Logout_URL"] = "";
			$dict["OMS_Note"] = "IMPL - Powered by Mocha";
			$dict["Pin_Auth_Enabled"] = "0";
			$dict["Pin_Max_Attempts"] = "0";
			$dict["Pin_Max_Length"] = "0";
			$dict["Pin_Min_Length"] = "0";
			$dict["Reset_Password_Online"] = "0";
			$dict["Show_Change_Password_Link"] = "1";
			$dict["Show_Forgotten_Password_Link"] = "0";
			$dict["SignOn_Custom_Message"] = "&lt;p&gt;OMS Default Tenant - Production&lt;/p&gt;";
			$dict["SignOn_Message_Locale"] = "en_US";
			$dict["SignOn_Note"] = "&lt;p&gt;OMS Default Tenant - Production&lt;/p&gt;";
			$dict["SignOn_Tenant_Logo_Url"] = "/" . $tenant . "/images/signon.xml";
			$dict["System_Confidence_Level"] = "PROD";

			// FIXME: build this from RAMB
			$dict["System_Note"] = "Your Implementation tenant will be unavailable for a maximum of 12 hours during the next Weekly Service Update; starting on Friday, December 30, 2022 at 6:00 PM Pacific Time (Los Angeles) (GMT-8) until Saturday, December 31, 2022 at 6:00 AM Pacific Time (Los Angeles) (GMT-8).";
			
			$dict["Use_One_Time_Use_Link"] = "0";

			foreach ($dict as $key => $value)
			{
				echo("\t" . $key . "=\"" . htmlspecialchars($value) . "\"");
			}
			echo(" />");
			
			$e->Cancel = true;
		}
	}

?>