<?php
namespace Modules\Orders\ImportedOrders\ProcessServicesList;

class View_Options extends \App\Mvc\View_Popup_PaginatedListing_OptionsAbstract
{
	/**
	 * (non-PHPdoc)
	 * @see \App\Mvc\View_Window_PaginatedListing_OptionsAbstract::populateDefinedOptions()
	 */
	public function populateDefinedOptions(\App\Mvc\View\Utils\RowOptions\Container\Simple $options)
	{

		// ext sys import options
		$extSysGroupOption = \App\Mvc\View\Utils\RowOptions\Container\OptionsMenu::create("extSysImportOptions");
		$extSysGroupOption->setSection('global');

		// general import
		$extSysImportOption = \App\Mvc\View\Utils\RowOptions\Option\Popup::create("extSysImport");
		$extSysImportOption->setLabel($this->lang['index']['options']['description']['extSysGenImport']);
		$extSysImportOption->setModule('Modules/Orders/ImportOrderFromExternalSystem')->setAction('index');
		$extSysImportOption->setSection('global');
		$extSysImportOption->setIcon('import');
		$extSysImportOption->setDimensions(600, 420);

		// filter order option
		$filterOrderOption = \App\Mvc\View\Utils\RowOptions\Option\Popup::create("filterOrder");
		$filterOrderOption->setDescription($this->lang['index']['options']['description']['filterOrder']);
		$filterOrderOption->setJsCallback("MVC.listing.installedHandlers.listing.filterByOfferExternalSystemReservationId(this)");
		$filterOrderOption->setIcon("search");

		// auto service on order
		$autoAddServiceOnOrderOption= \App\Mvc\View\Utils\RowOptions\Option\Popup::create('autoAddServiceOnOrder');
		$autoAddServiceOnOrderOption->setDescription($this->lang['index']['options']['description']['autoAddServiceOnOrder']);
		$autoAddServiceOnOrderOption->setJsCallback("MVC.listing.installedHandlers.listing.autoImportService(this)");
		$autoAddServiceOnOrderOption->setIcon('generate');

		// add service on order
		$addServiceOnOrderOption = \App\Mvc\View\Utils\RowOptions\Option\Popup::create('addServiceOnOrder');
		$addServiceOnOrderOption->setDescription($this->lang['index']['options']['description']['addServiceOnOrder']);
		$addServiceOnOrderOption->setJsCallback("MVC.listing.installedHandlers.listing.importService(this)");
		$addServiceOnOrderOption->setIcon('add');

		// quick process, bulk
		$quickProcess = \App\Mvc\View\Utils\RowOptions\Option\Popup::create('quickProcess');
		$quickProcess->setDescription($this->lang['index']['options']['description']['quickProcces']);
		$quickProcess->setJsCallback("MVC.listing.installedHandlers.listing.quickProcess(this)");
		$quickProcess->setIcon('quickDetails');

		// auto service on order, bulk
		$autoAddServiceOnOrderOptionBulk = \App\Mvc\View\Utils\RowOptions\Option\Popup::create('autoAddServiceOnOrder');
		$autoAddServiceOnOrderOptionBulk->setDescription($this->lang['index']['options']['description']['autoAddServicesOnOrder']);
		$autoAddServiceOnOrderOptionBulk->setJsCallback("MVC.listing.installedHandlers.listing.autoImportServices(this)");
		$autoAddServiceOnOrderOptionBulk->setIcon('generate');
		$autoAddServiceOnOrderOptionBulk->setSection('bulk');

		// add service on order, bulk
		$addServiceOnOrderOptionBulk = \App\Mvc\View\Utils\RowOptions\Option\Popup::create('addServiceOnOrder');
		$addServiceOnOrderOptionBulk->setDescription($this->lang['index']['options']['description']['addServicesOnOrder']);
		$addServiceOnOrderOptionBulk->setJsCallback("MVC.listing.installedHandlers.listing.importServices(this)");
		$addServiceOnOrderOptionBulk->setIcon('addMultiple');
		$addServiceOnOrderOptionBulk->setSection('bulk');

		// quick process, bulk
		$quickProcessBulk = \App\Mvc\View\Utils\RowOptions\Option\Popup::create('quickProcess');
		$quickProcessBulk->setDescription($this->lang['index']['options']['description']['quickProcces']);
		$quickProcessBulk->setJsCallback("MVC.listing.installedHandlers.listing.quickProcessBulk(this)");
		$quickProcessBulk->setIcon('quickDetails');
		$quickProcessBulk->setSection('bulk');

		$options->append($extSysGroupOption);
		$extSysGroupOption->append($extSysImportOption);

		$options->append($filterOrderOption);
		$options->append($quickProcess);
		$options->append($autoAddServiceOnOrderOption);
		$options->append($addServiceOnOrderOption);

		$options->append($quickProcessBulk);
		$options->append($autoAddServiceOnOrderOptionBulk);
		$options->append($addServiceOnOrderOptionBulk);

	}
}
