<?php

namespace GriffinForms\Admin\App\FormControls;

class Hidden extends Format
{
    public function render(): string
    {
        $attrs = array_merge($this->getInputAttributes(), [
            'type' => 'hidden',
            'id' => $this->getHtmlId(),
            'name' => $this->getFieldName(),
            'value' => (string) $this->field_value,
        ]);

        return '<input' . $this->renderAttributes($attrs) . ' />';
    }
}
