<?php

namespace Modules\Admin\Server\Logs;

class View_Options extends \App\Mvc\View_Window_PaginatedListing_OptionsAbstract
{
	public function populateDefinedOptions(\App\Mvc\View\Utils\RowOptions\Container\Simple $options)
	{
		if (SHOW_DEBUGS) {
			// ext sys import options
			$reportsContainer = \App\Mvc\View\Utils\RowOptions\Container\OptionsMenu::create("reports");
			$reportsContainer->setSection('global');

			$reportsContainer
				->append(
					\App\Mvc\View\Utils\RowOptions\Option\Popup::create("generateReportLoginStats")
						->setLabel($this->lang['index']['options']['description']['generateReportLoginStats'])
						->setAction('generateReportLoginStats')
						->setSection('global')
						->setIcon('export')
						->setDimensions(600, 420)
				)
				->append(
					\App\Mvc\View\Utils\RowOptions\Option\Popup::create("generateReportFluXLogsRaw")
						->setLabel($this->lang['index']['options']['description']['generateReportFluXLogsRaw'])
						->setAction('generateReportFluXLogsRaw')
						->setSection('global')
						->setIcon('export')
						->setDimensions(600, 420)
				)
				->append(
					\App\Mvc\View\Utils\RowOptions\Option\Popup::create("generateReportFluXLogsFilteredL3")
						->setLabel($this->lang['index']['options']['description']['generateReportFluXLogsFilteredL3'])
						->setAction('generateReportFluXLogsFilteredL3')
						->setSection('global')
						->setIcon('export')
						->setDimensions(600, 420)
				)
				->append(
					\App\Mvc\View\Utils\RowOptions\Option\Popup::create("generateReportCoreAppError")
						->setLabel($this->lang['index']['options']['description']['generateReportCoreAppError'])
						->setAction('generateReportCoreAppError')
						->setSection('global')
						->setIcon('export')
						->setDimensions(600, 420)
				)
				->append(
					\App\Mvc\View\Utils\RowOptions\Option\Popup::create("generateReportCoreAppErrorUnique")
						->setLabel($this->lang['index']['options']['description']['generateReportCoreAppErrorUnique'])
						->setAction('generateReportCoreAppErrorUnique')
						->setSection('global')
						->setIcon('export')
						->setDimensions(600, 420)
				)
				->append(
					\App\Mvc\View\Utils\RowOptions\Option\Popup::create("generateReportLogCounts")
						->setLabel($this->lang['index']['options']['description']['generateReportLogCounts'])
						->setAction('generateReportLogCounts')
						->setSection('global')
						->setIcon('export')
						->setDimensions(600, 420)
				)
				->append(
					\App\Mvc\View\Utils\RowOptions\Option\Popup::create("generateReportLogSize")
						->setLabel($this->lang['index']['options']['description']['generateReportLogSize'])
						->setAction('generateReportLogSize')
						->setSection('global')
						->setIcon('export')
						->setDimensions(600, 420)
				)
				->append(
					\App\Mvc\View\Utils\RowOptions\Option\Popup::create("generateReportSaElectronicInvoice")
						->setLabel($this->lang['index']['options']['description']['generateReportSaElectronicInvoice'])
						->setAction('generateReportSaElectronicInvoice')
						->setSection('global')
						->setIcon('export')
						->setDimensions(600, 420)
				);

			$options->append($reportsContainer);
		}

		$options
			->append(\App\Mvc\View\Utils\RowOptions\Option\Popup::create("logDetails")
				->setDescription($this->lang['index']['options']['description']['logDetails'])
				->setIcon("view")
				->setAction("logDetails")
				->setDimensions(850, 500)
				->setKeyForCurrentRow('id')
			)
			->append(\App\Mvc\View\Utils\RowOptions\Container\OptionsMenu::create('filtering')
				->append(\App\Mvc\View\Utils\RowOptions\Container\JsMenu::create("showLessItemsLikeThisDetailed")
					->setLabel($this->lang['index']['options']['description']['showLessItemsLikeThis'])
					->setJsCallback("MVC.listing.installedHandlers.listing.populateShowLessItemsLikeThisDetailed(this, menuDropdown, li)")
				)

				->append(\App\Mvc\View\Utils\RowOptions\Container\JsMenu::create("showMoreItemsLikeThisDetailed")
					->setLabel($this->lang['index']['options']['description']['showMoreItemsLikeThis'])
					->setJsCallback("MVC.listing.installedHandlers.listing.populateShowMoreItemsLikeThisDetailed(this, menuDropdown, li)")
				)

				->append(\App\Mvc\View\Utils\RowOptions\Container\OptionsMenu::create('showThisTimeline')
					->setLabel($this->lang['index']['options']['description']['showThisTimeline'])
					->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("showThisTimeline_1")
						->setIcon('none')
						->setLabel($this->lang['index']['options']['description']['showThisTimeline_1'])
						->setJsCallback("MVC.listing.installedHandlers.listing.showThisTimeline(btn,  1*60)")
					)
					->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("showThisTimeline_2")
						->setIcon('none')
						->setLabel($this->lang['index']['options']['description']['showThisTimeline_2'])
						->setJsCallback("MVC.listing.installedHandlers.listing.showThisTimeline(btn,  2*60)")
					)
					->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("showThisTimeline_5")
						->setIcon('none')
						->setLabel($this->lang['index']['options']['description']['showThisTimeline_5'])
						->setJsCallback("MVC.listing.installedHandlers.listing.showThisTimeline(btn,  5*60)")
					)
					->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("showThisTimeline_10")
						->setIcon('none')
						->setLabel($this->lang['index']['options']['description']['showThisTimeline_10'])
						->setJsCallback("MVC.listing.installedHandlers.listing.showThisTimeline(btn,  10*60)")
					)
					->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("showThisTimeline_15")
						->setIcon('none')
						->setLabel($this->lang['index']['options']['description']['showThisTimeline_15'])
						->setJsCallback("MVC.listing.installedHandlers.listing.showThisTimeline(btn,  15*60)")
					)
					->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("showThisTimeline_30")
						->setIcon('none')
						->setLabel($this->lang['index']['options']['description']['showThisTimeline_30'])
						->setJsCallback("MVC.listing.installedHandlers.listing.showThisTimeline(btn,  30*60)")
					)
					->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("showThisTimeline_60")
						->setIcon('none')
						->setLabel($this->lang['index']['options']['description']['showThisTimeline_60'])
						->setJsCallback("MVC.listing.installedHandlers.listing.showThisTimeline(btn,  30*60)")
					)
					->append(\App\Mvc\View\Utils\RowOptions\Option\Option::create("showThisTimeline_120")
						->setIcon('none')
						->setLabel($this->lang['index']['options']['description']['showThisTimeline_120'])
						->setJsCallback("MVC.listing.installedHandlers.listing.showThisTimeline(btn,  120*60)")
					)
				)
			)
		;
	}

}
