<?php

namespace IMATHUZH\Qfq\Core\Renderer\FormElement\Base;

use IMATHUZH\Qfq\Core\Form\FormElement\AbstractFormElement;
use IMATHUZH\Qfq\Core\Helper\Support;
use IMATHUZH\Qfq\Core\Renderer\FormElement\NativeRenderer;

class CaptchaRenderer extends NativeRenderer {

    /**
     * @inheritDoc
     *
     * @param AbstractFormElement $fe
     * @return string
     */
    public function renderInput(AbstractFormElement $fe): string {
        $htmlCaptcha = Support::wrapTag('<cap-widget ' . Support::arrayToXMLAttributes($fe->captchaHtmlAttributes) . ' >', '', false);
        return $htmlCaptcha;
    }

}