<?php

namespace ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\Custom\Fields;


use ModulesGarden\Servers\ZimbraEmail\Core\UI\Interfaces\AdminArea;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Interfaces\ClientArea;
use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Text;

/**
 *
 * Created by PhpStorm.
 * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
 * Date: 08.11.19
 * Time: 10:32
 * Class ExtendedInputField
 */
class ExtendedInputField extends Text implements AdminArea, ClientArea
{
    protected $id           = 'extendedInputField';
    protected $name         = 'extendedInputField';
    protected $fieldType    = self::TYPE_DEFAULT;

    const TYPE_PASSWORD     = 'password';
    const TYPE_EMAIL        = 'email';
    const TYPE_TEXT         = 'text';
    const TYPE_NUMBER       = 'number';
    const TYPE_DEFAULT      = 'text';

    protected $rawDescription = null;

    /**
     * @return string
     */
    public function getFieldType()
    {
        return $this->fieldType;
    }

    /**
     * @param $fieldType
     * @return $this
     */
    public function setFieldType($fieldType)
    {
        $this->fieldType = $fieldType;

        return $this;
    }

    /**
     * @return null
     */
    public function getRawDescription()
    {
        return $this->rawDescription;
    }

    /**
     * @param $rawDescription
     * @return $this
     */
    public function setRawDescription($rawDescription)
    {
        $this->rawDescription = $rawDescription;
        return $this;
    }

    public function isRawDescription()
    {
        return $this->rawDescription !== null;
    }





}