<?php

namespace ThurData\Servers\KerioEmail\Core\UI\Widget\Others;

use ThurData\Servers\KerioEmail\Core\UI\Builder\BaseContainer;

/**
 * CopyKeyForDataTable - a copy on click ui element
 *
 * @autor ThurData <info@thurdata.ch>
 */
class CopyKeyForDataTable extends BaseContainer
{
    protected $id   = 'copyKeyForDataTable';
    protected $name = 'copyKeyForDataTable';

    protected $vueComponent            = true;
    protected $defaultVueComponentName = 'ds-copy-on-click';
    
    protected $textToCopy = null;

    public function setCopyText($textToCopy)
    {
        if (is_string($textToCopy) && $textToCopy !== '')
        {
            $this->textToCopy = $textToCopy;
        }
        
        return $this;
    }
    
    public function getCopyText()
    {
        return $this->textToCopy;
    }
}
