<?php

declare(strict_types=1);

namespace KupShop\ReservationBundle\Admin;

use KupShop\KupShopBundle\Util\Compat\ServiceContainer;
use KupShop\ReservationBundle\Util\ReservationUtil;

class Reservation extends \Window
{
    protected $tableName = 'reservations';

    public function get_vars()
    {
        $vars = parent::get_vars();

        $reservationUtil = ServiceContainer::getService(ReservationUtil::class);

        $vars['body']['reservation'] = $reservationUtil->getReservation((int) $this->getID());

        return $vars;
    }
}

return Reservation::class;
