<?php

namespace ControlScripts\Scopes;

use \SHServ\Middleware\ControlScripts;
use \SHServ\Implements\ControlScriptsInterface;

class MasterBedroomScope extends ControlScripts implements ControlScriptsInterface {
	use \ControlScripts\Common;

	public function register_sync_map(): void {
		$this -> register_global_device_sync_map();
	}

	public function register_events_handlers(): void {
		$this -> auto_button_bindings([
			"master_room_btns" => ["mute" => [2, 3]],
			"bed_btns_right_1" => [],
			"bed_btns_left" => [],
		]);
	}

	public function register_actions_scripts(): void {
		$this -> add_group_toggle_action("master_toggle", "Спальня", [
			"light_hub_1:1",
		], [
			"description" => "Вкл/Выкл. свет в спальне",
			"author" => "Eugene Sukhodolskiy",
			"state_callback" => function() {
				return $this -> helper() -> make_relay_indicator("light_hub_1", 1);
			},
		]);
	}

	public function register_regular_scripts(): void {}
}
