<?php declare(strict_types = 0);
/*
** Copyright (C) 2021-2026 initMAX s.r.o.
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/


/**
 * tetrisMAX widget form view for Zabbix 6.4.
 *
 * 6.4 IS THE TRAP: it loads the manifest-v2 tree - the same controller, the
 * same field - against the form API 7.0 later renamed. The "?" tooltip is
 * setHelpHint(string) here and setFieldHint(CTag) from 7.0, and calling the
 * newer name is a fatal, not a missing icon.
 *
 * ONE PRODUCT: the same field, the same label, the same tooltip as
 * widget.edit.php renders on 7.0 - 7.4. Only the way it is built differs,
 * because the frontend does.
 *
 * @var CView $this
 * @var array $data
 */

use Modules\TetrisMAX\Services\WidgetTranslator;

(new CWidgetFormView($data))
	->addField(
		(new CWidgetFieldRadioButtonListView($data['fields']['speed']))
			->setHelpHint(WidgetTranslator::translate('form.hint.speed'))
	)
	->show();
