<?php
namespace PpPhp\Plugins;
use PpPhp\Core\ViewPlugin;

class PlainText implements ViewPlugin
{
    public static function id(): string { return 'PlainText'; }
    public static function label(): string { return 'Plain Text'; }
    public static function version(): string { return '1.0.0'; }
    public static function description(): string { return 'Displays the value as escaped plain text.'; }

    public static function render(mixed $value, array $settings): string
    {
        return htmlspecialchars((string)$value);
    }

    public static function settingsSchema(): array
    {
        return [];
    }

    public static function assets(): array
    {
        return ['js' => [], 'css' => []];
    }
}