<?php
/**
 * @package    VP Email Manager
 * @copyright  Copyright (C) 2012-2021 VirtuePlanet Services LLP. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 * @author     Abhishek Das <info@virtueplanet.com>
 * @link       https://www.virtueplanet.com
 */

defined('_JEXEC') or die;

JFormHelper::loadFieldClass('list');

class JFormFieldVpemtype extends JFormFieldList
{
	public $type = 'vpemtype';
	
	protected function getOptions()
	{
		$types = [
			'order_confirmation',
			'order_status_change',
			'user_registration',
			'product_notification',
			'recommend_product',
			'admin_order_confirmation',
			'admin_order_status_change',
			'admin_user_registration',
			//'admin_product_notification',
			'admin_ask_a_question'
		];
		$options = [];
		
		foreach ($types as $type)
		{
			$name = JText::_('COM_VPEM_TEMPLATES_TYPE_OPTION_' . strtoupper($type));
			
			$options[] = JHtml::_('select.option', $type, $name);
		}
		
		return array_merge(parent::getOptions(), $options);
	}
}