<?php

namespace apexl\Io\modules\userDisplay\forms;

use apexl\Io\includes\Routes;
use apexl\Io\includes\System;
use apexl\Io\modules\formbuilder\entities\formEntity;
use apexl\Io\modules\formbuilder\includes\inputField;
use apexl\Io\modules\formbuilder\includes\textareaField;

class createNoteForm {

    public function createNoteForm($args=null) {

        $form = new formEntity();
        $form->setId('create-user-note');
        $form->setMethod('post');
        $form->setActionUrl(Routes::getRoutePattern('user.createNote'));
        $form->setSubmitText('Add Note');

        $form->addField((new inputField('userId'))->setInputType('hidden')->isRequired()->setValue($args['userId']));
        $form->addField((new textareaField('content'))->setLabel('Note')->setPlaceholder('Add your note here...'));

        return $form->getBuiltFormArray();
    }
}
