<?php
// components/Form/Presentation/BoolPresenter.php

namespace Components\Form\Presentation;

class BoolPresenter implements Presenter
{
    public static function render($value, array $def): string
    {
        $on = ($value === 'on' || $value === '1' || $value === 'true');
        $label = $on ? \mh_lng('UI_ON','On') : \mh_lng('UI_OFF','Off');
        return \Components\Base::h($label);
    }
}
