<?php

declare(strict_types=1);

namespace App\Framework\Admin\FormFields;

use App\Framework\View\FormBuilder;

/**
 * Form Field Interface
 *
 * All form fields must implement this interface
 */
interface FormField
{
    /**
     * Render the field and add it to the form builder
     */
    public function render(FormBuilder $form): FormBuilder;

    /**
     * Get the field name
     */
    public function getName(): string;

    /**
     * Get the field value
     */
    public function getValue(): mixed;

    /**
     * Get the field label
     */
    public function getLabel(): string;
}
