<?php

namespace Shm\ShmTypes\CompositeTypes;

use Shm\Shm;
use Shm\ShmTypes\StructureType;

class HallType extends StructureType
{
    public string $type = 'hall';


    public bool $compositeType = true;




    public function __construct()
    {



        parent::__construct([

            'version' => Shm::int(),
            'belts' => Shm::arrayOf(Shm::structure([
                'id' =>  Shm::nonNull(Shm::string()),
                'name' => Shm::nonNull(Shm::string()),
                'color' => Shm::nonNull(Shm::string()),
            ])->staticBaseTypeName("HallBelt")),

            'seats' => Shm::arrayOf(Shm::structure([
                'id' => Shm::nonNull(Shm::string()),
                'x' =>  Shm::nonNull(Shm::float()),
                'y' =>  Shm::nonNull(Shm::float()),
                'radius' =>  Shm::float(),
                'seatNumber' => Shm::string(),
                'seatRow' => Shm::string(),
                'beltId' => Shm::string(),
                'sectorId' => Shm::string(),
                'sectorName' => Shm::string(),
                'rotation' =>  Shm::float(),

            ])->staticBaseTypeName("HallSeat")),
            'tables' => Shm::arrayOf(Shm::structure([
                'id' => Shm::nonNull(Shm::string()),
                'x' =>  Shm::nonNull(Shm::float()),
                'y' =>  Shm::nonNull(Shm::float()),
                'width' =>  Shm::nonNull(Shm::float()),
                'height' =>  Shm::nonNull(Shm::float()),
                'rotation' =>  Shm::float(),
            ])->staticBaseTypeName("HallTable")),

            'stages' => Shm::arrayOf(Shm::structure([
                'id' => Shm::nonNull(Shm::string()),
                'x' =>  Shm::nonNull(Shm::float()),
                'y' =>  Shm::nonNull(Shm::float()),
                'width' =>  Shm::nonNull(Shm::float()),
                'height' =>  Shm::nonNull(Shm::float()),
                'label' => Shm::nonNull(Shm::string()),
                'rotation' =>  Shm::float(),
            ])->staticBaseTypeName("HallStage")),


            'walls' => Shm::arrayOf(Shm::structure([
                'id' => Shm::nonNull(Shm::string()),
                'x' =>  Shm::nonNull(Shm::float()),
                'y' =>  Shm::nonNull(Shm::float()),
                'width' =>  Shm::nonNull(Shm::float()),
                'height' =>  Shm::nonNull(Shm::float()),
                'rotation' =>  Shm::float(),
            ])->staticBaseTypeName("HallWall")),

            'zones' => Shm::arrayOf(Shm::structure([
                'id' => Shm::nonNull(Shm::string()),
                'x' =>  Shm::nonNull(Shm::float()),
                'y' =>  Shm::nonNull(Shm::float()),
                'width' =>  Shm::nonNull(Shm::float()),
                'height' =>  Shm::nonNull(Shm::float()),
                'rotation' =>  Shm::float(),
                'capacity' => Shm::int(),
                'label' => Shm::string(),
            ])->staticBaseTypeName("HallZone")),

            'sectors' => Shm::arrayOf(Shm::structure([
                'id' => Shm::nonNull(Shm::string()),
                'x' =>  Shm::nonNull(Shm::float()),
                'y' =>  Shm::nonNull(Shm::float()),
                'width' =>  Shm::nonNull(Shm::float()),
                'height' =>  Shm::nonNull(Shm::float()),
                'rotation' =>  Shm::float(),
                'label' => Shm::string(),
            ])->staticBaseTypeName("HallSector")),


        ]);
        $this->staticBaseTypeName("Hall");
    }
}