<?php
/**
 * Its custom field
 *
 * @package Elite_Notification_Lite\Libs
 */

namespace Elite_Notification_Lite\Libs;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Class Custom_Field
 *
 * @package Vite_Reward_Lite\Libs
 */
class Elite_Notification_Custom_Field {
	/**
	 * Its property id
	 *
	 * @var string
	 */
	public $id;
	/**
	 * Its property label
	 *
	 * @var string
	 */
	public $label;
	/**
	 * Its property help_text
	 *
	 * @var string
	 */
	public $help_text = '';

	/**
	 * Its property help_text
	 *
	 * @var string
	 */
	public $placeholder = '';

	/**
	 * Its property is_required
	 *
	 * @var string
	 */
	public $is_required = '';
	/**
	 * Its property type
	 *
	 * @var string
	 * T=Textbox, N=Numeric, D=Date,C=Checkbox, S=Switch, R=Radio, W=Dropdown, E=Textarea, U=URL Input,I=Instruction, H=Hidden
	 */
	public $type = 'T';
	/**
	 * Its property options
	 *
	 * @var array
	 */
	public $options = array();
	/**
	 * Its property opt_limit
	 *
	 * @var string
	 */
	public $opt_limit = '';
	/**
	 * Its property status
	 *
	 * @var string
	 */
	public $status = 'A';
	/**
	 * Its property des
	 *
	 * @var string
	 */
	public $des = '';
	/**
	 * Its property val
	 *
	 * @var string
	 */
	public $val = '';
	/**
	 * Its property is_pro
	 *
	 * @var string
	 */
	public $is_pro = 'N';
	/**
	 * Its property true_val
	 *
	 * @var string
	 */
	public $true_val = 'Y';
	/**
	 * Its property false_val
	 *
	 * @var string
	 */
	public $false_val = 'N';
	/**
	 * Its property height
	 *
	 * @var string
	 */
	public $height = '';
	/**
	 * Its property res_class
	 *
	 * @var string
	 */
	public $res_class = '';
	/**
	 * Its property input_class
	 *
	 * @var string
	 */
	public $input_class = '';
	/**
	 * Its property prefix
	 *
	 * @var string
	 */
	public $prefix = '';
	/**
	 * Its property postfix
	 *
	 * @var string
	 */
	public $postfix = '';

	/**
	 * The get input is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param mixed  $label It is label param.
	 * @param string $val It is val param.
	 * @param string $placeholder It is placeholder param.
	 * @param string $help_text It is help_text param.
	 * @param string $is_required It is is_required param.
	 * @param string $type It is type param.
	 * @param array  $options It is options param.
	 * @param string $opt_limit It is opt_limit param.
	 * @param string $des It is des param.
	 * @param string $status It is status param.
	 * @param string $is_pro It is is_pro param.
	 * @param string $height It is height param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 * @param string $prefix It is prefix param.
	 * @param string $postfix It is postfix param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_input(
		$id,
		$label,
		$val = '',
		$placeholder = '',
		$help_text = '',
		$is_required = 'Y',
		$type = 'T',
		$options = array(),
		$opt_limit = '',
		$des = '',
		$status = 'A',
		$is_pro = 'N',
		$height = '',
		$res_class = '',
		$input_class = '',
		$prefix = '',
		$postfix = ''
	) {
		$obj              = new self();
		$obj->id          = $id;
		$obj->label       = $label;
		$obj->is_pro      = $is_pro;
		$obj->placeholder = $placeholder;
		$obj->help_text   = $help_text;
		$obj->val         = $val;
		$obj->is_required = $is_required;
		$obj->type        = $type;
		$obj->options     = $options;
		$obj->opt_limit   = $opt_limit;
		$obj->status      = $status;
		$obj->des         = $des;
		$obj->height      = $height;
		$obj->res_class   = $res_class;
		$obj->input_class = $input_class;
		$obj->prefix     = $prefix;
		$obj->postfix    = $postfix;

		return $obj;
	}

	/**
	 * The get textbox is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param mixed  $label It is label param.
	 * @param string $val It is val param.
	 * @param string $is_pro It is is_pro param.
	 * @param string $is_required It is is_required param.
	 * @param string $placeholder It is placeholder param.
	 * @param string $help_text It is help_text param.
	 * @param string $des It is des param.
	 * @param string $status It is status param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 * @param string $prefix It is prefix param.
	 * @param string $postfix It is postfix param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_textbox(
		$id,
		$label,
		$val = '',
		$is_pro = 'N',
		$is_required = 'Y',
		$placeholder = '',
		$help_text = '',
		$des = '',
		$status = 'A',
		$res_class = '',
		$input_class = '',
		$prefix = '',
		$postfix = ''
	) {
		return self::get_input(
			$id,
			$label,
			$val,
			$placeholder,
			$help_text,
			$is_required,
			'T',
			array(),
			'',
			$des,
			$status,
			$is_pro,
			'',
			$res_class,
			$input_class,
			$prefix,
			$postfix
		);
	}

	/**
	 * The get password box is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param mixed  $label It is label param.
	 * @param string $val It is val param.
	 * @param string $is_pro It is is_pro param.
	 * @param string $is_required It is is_required param.
	 * @param string $placeholder It is placeholder param.
	 * @param string $help_text It is help_text param.
	 * @param string $des It is des param.
	 * @param string $status It is status param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 * @param string $prefix It is prefix param.
	 * @param string $postfix It is postfix param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_password_box(
		$id,
		$label,
		$val = '',
		$is_pro = 'N',
		$is_required = 'Y',
		$placeholder = 'Enter Password',
		$help_text = '',
		$des = '',
		$status = 'A',
		$res_class = '',
		$input_class = '',
		$prefix = '',
		$postfix = ''
	) {
		return self::get_input(
			$id,
			$label,
			$val,
			$placeholder,
			$help_text,
			$is_required,
			'P',
			array(),
			'',
			$des,
			$status,
			$is_pro,
			'',
			$res_class,
			$input_class,
			$prefix,
			$postfix
		);
	}

	/**
	 * The get url is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param mixed  $label It is label param.
	 * @param string $val It is val param.
	 * @param string $is_pro It is is_pro param.
	 * @param string $is_required It is is_required param.
	 * @param string $placeholder It is placeholder param.
	 * @param string $help_text It is help_text param.
	 * @param string $des It is des param.
	 * @param string $status It is status param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 * @param string $prefix It is prefix param.
	 * @param string $postfix It is postfix param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_url(
		$id,
		$label,
		$val = '',
		$is_pro = 'N',
		$is_required = 'Y',
		$placeholder = '',
		$help_text = '',
		$des = '',
		$status = 'A',
		$res_class = '',
		$input_class = '',
		$prefix = '',
		$postfix = ''
	) {
		return self::get_input(
			$id,
			$label,
			$val,
			$placeholder,
			$help_text,
			$is_required,
			'U',
			array(),
			'',
			$des,
			$status,
			$is_pro,
			'',
			$res_class,
			$input_class,
			$prefix,
			$postfix
		);
	}

	/**
	 * The get hidden is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param string $val It is val param.
	 * @param string $is_pro It is is_pro param.
	 * @param string $status It is status param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_hidden(
		$id,
		$val = '',
		$is_pro = 'N',
		$status = 'A',
		$res_class = '',
		$input_class = ''
	) {
		return self::get_input(
			$id,
			'',
			$val,
			'',
			'Y',
			'U',
			'H',
			array(),
			'',
			'',
			$status,
			$is_pro,
			'',
			$res_class,
			$input_class
		);
	}

	/**
	 * The get textarea is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param mixed  $label It is label param.
	 * @param string $val It is val param.
	 * @param string $is_pro It is is_pro param.
	 * @param string $is_required It is is_required param.
	 * @param string $placeholder It is placeholder param.
	 * @param string $help_text It is help_text param.
	 * @param string $des It is des param.
	 * @param string $status It is status param.
	 * @param string $height It is height param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_textarea(
		$id,
		$label,
		$val = '',
		$is_pro = 'N',
		$is_required = 'Y',
		$placeholder = '',
		$help_text = '',
		$des = '',
		$status = 'A',
		$height = '',
		$res_class = '',
		$input_class = ''
	) {
		return self::get_input(
			$id,
			$label,
			$val,
			$placeholder,
			$help_text,
			$is_required,
			'E',
			array(),
			'',
			$des,
			$status,
			$is_pro,
			$height,
			$res_class,
			$input_class
		);
	}

	/**
	 * The get numeric is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param mixed  $label It is label param.
	 * @param string $val It is val param.
	 * @param string $is_pro It is is_pro param.
	 * @param string $is_required It is is_required param.
	 * @param string $placeholder It is placeholder param.
	 * @param string $help_text It is help_text param.
	 * @param string $des It is des param.
	 * @param string $status It is status param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 * @param string $prefix It is prefix param.
	 * @param string $postfix It is postfix param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_numeric(
		$id,
		$label,
		$val = '',
		$is_pro = 'N',
		$is_required = 'Y',
		$placeholder = '',
		$help_text = '',
		$des = '',
		$status = 'A',
		$res_class = '',
		$input_class = '',
		$prefix = '',
		$postfix = ''
	) {
		return self::get_input(
			$id,
			$label,
			$val,
			$placeholder,
			$help_text,
			$is_required,
			'N',
			array(),
			'',
			$des,
			$status,
			$is_pro,
			'',
			$res_class,
			$input_class,
			$prefix,
			$postfix
		);
	}

	/**
	 * The get date is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param mixed  $label It is label param.
	 * @param string $val It is val param.
	 * @param string $is_pro It is is_pro param.
	 * @param string $is_required It is is_required param.
	 * @param string $placeholder It is placeholder param.
	 * @param string $help_text It is help_text param.
	 * @param string $des It is des param.
	 * @param string $status It is status param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_date(
		$id,
		$label,
		$val = '',
		$is_pro = 'N',
		$is_required = 'Y',
		$placeholder = '',
		$help_text = '',
		$des = '',
		$status = 'A',
		$res_class = '',
		$input_class = ''
	) {
		return self::get_input(
			$id,
			$label,
			$val,
			$placeholder,
			$help_text,
			$is_required,
			'D',
			array(),
			'',
			$des,
			$status,
			$is_pro,
			'',
			$res_class,
			$input_class
		);
	}

	/**
	 * The get switch is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param mixed  $label It is label param.
	 * @param string $val It is val param.
	 * @param string $is_pro It is is_pro param.
	 * @param string $true_val It is true_val param.
	 * @param string $false_val It is false_val param.
	 * @param string $help_text It is help_text param.
	 * @param string $des It is des param.
	 * @param string $status It is status param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_switch(
		$id,
		$label,
		$val = '',
		$is_pro = 'N',
		$true_val = 'Y',
		$false_val = 'N',
		$help_text = '',
		$des = '',
		$status = 'A',
		$res_class = '',
		$input_class = ''
	) {
		return self::get_input(
			$id,
			$label,
			$val,
			'',
			$help_text,
			'Y',
			'S',
			array(
				'true_val'  => $true_val,
				'false_val' => $false_val,
			),
			'',
			$des,
			$status,
			$is_pro,
			'',
			$res_class,
			$input_class
		);
	}

	/**
	 * The get radio is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param mixed  $label It is label param.
	 * @param string $val It is val param.
	 * @param string $is_pro It is is_pro param.
	 * @param array  $options It is options param.
	 * @param string $help_text It is help_text param.
	 * @param string $des It is des param.
	 * @param string $status It is status param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_radio(
		$id,
		$label,
		$val = '',
		$is_pro = 'N',
		$options = array(),
		$help_text = '',
		$des = '',
		$status = 'A',
		$res_class = '',
		$input_class = ''
	) {
		return self::get_input(
			$id,
			$label,
			$val,
			'',
			$help_text,
			'Y',
			'R',
			$options,
			'',
			$des,
			$status,
			$is_pro,
			'',
			$res_class,
			$input_class
		);
	}

	/**
	 * The get checkbox is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param mixed  $label It is label param.
	 * @param string $val It is val param.
	 * @param string $is_pro It is is_pro param.
	 * @param string $is_required It is is_required param.
	 * @param array  $options It is options param.
	 * @param string $option_limit It is option_limit param.
	 * @param string $help_text It is help_text param.
	 * @param string $des It is des param.
	 * @param string $status It is status param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_checkbox(
		$id,
		$label,
		$val = '',
		$is_pro = 'N',
		$is_required = 'Y',
		$options = array(),
		$option_limit = '',
		$help_text = '',
		$des = '',
		$status = 'A',
		$res_class = '',
		$input_class = ''
	) {
		return self::get_input(
			$id,
			$label,
			$val,
			'',
			$help_text,
			$is_required,
			'C',
			$options,
			$option_limit,
			$des,
			$status,
			$is_pro,
			'',
			$res_class,
			$input_class
		);
	}

	/**
	 * The get dropdown is generated by appsbd
	 *
	 * @param mixed  $id It is id param.
	 * @param mixed  $label It is label param.
	 * @param string $val It is val param.
	 * @param string $is_pro It is is_pro param.
	 * @param string $select_text It is select_text param.
	 * @param string $is_required It is is_required param.
	 * @param array  $options It is options param.
	 * @param int    $option_limit It is option_limit param.
	 * @param string $help_text It is help_text param.
	 * @param string $des It is des param.
	 * @param string $status It is status param.
	 * @param string $res_class It is res_class param.
	 * @param string $input_class It is input_class param.
	 *
	 * @return Elite_Notification_Custom_Field
	 */
	public static function get_dropdown(
		$id,
		$label,
		$val = '',
		$is_pro = 'N',
		$select_text = '',
		$is_required = 'Y',
		$options = array(),
		$option_limit = 1,
		$help_text = '',
		$des = '',
		$status = 'A',
		$res_class = '',
		$input_class = ''
	) {
		return self::get_input(
			$id,
			$label,
			$val,
			$select_text,
			$help_text,
			$is_required,
			'W',
			$options,
			$option_limit,
			$des,
			$status,
			$is_pro,
			'',
			$res_class,
			$input_class
		);
	}

	/**
	 * The set val is generated by appsbd
	 *
	 * @param mixed $val Its val param.
	 */
	public function set_val( $val ) {
		$this->val = $val;
	}

	/**
	 * The get id is generated by appsbd
	 *
	 * @return mixed
	 */
	public function get_id() {
		return $this->id;
	}
}
