<?php


namespace ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Home\Forms;


use ModulesGarden\ProxmoxAddon\App\Services\Cloud\ProductService;
use ModulesGarden\Servers\ProxmoxCloudVps\App\UI\Home\Providers\SshKeyProvider;
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Interfaces\ClientArea;
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\BaseForm;
use ModulesGarden\Servers\ProxmoxCloudVps\Core\UI\Widget\Forms\Fields\Textarea;

class SshKeyForm extends BaseForm implements ClientArea
{
    use ProductService;

    public function initContent()
    {
        $this->initIds('sshKeyForm');
        $this->setProvider(new SshKeyProvider());
        $this->addField(new Textarea('public'));
        if($this->configuration()->isSshDeletePrivateKey()){
            $this->setConfirmMessage('SSH Private Key you can download only once.');
        }
        $this->loadDataToForm();
    }


}