<?php

namespace Storeplugin\PDFInvoice\Framework\Contracts;

defined('ABSPATH') || exit;

/**
 * Interface for field type classes.
 *
 * @package Storeplugin\PDFInvoice\Framework\Fields\Contracts
 * @since 1.0.0
 */
interface FieldInterface
{
    /**
     * Get the field type identifier
     *
     * @return string Field type (e.g., 'text', 'select', 'checkbox')
     */
    public static function getType(): string;

    /**
     * Render the field HTML
     *
     * @param array  $field  Normalized field definition
     * @param mixed  $value  Current field value
     * @param string $prefix Name prefix for form field
     * @return string Escaped HTML output
     */
    public function render(array $field, $value, string $prefix): string;
}
