<?php

namespace App\Modules\Room\Application\ListAllNoRoom;

use App\Http\Controllers\Owner\Room\RoomListOrderBy;
use App\Http\Controllers\Owner\Room\RoomListOrderType;
use App\Modules\DefinedService\Location\Domain\IdLocation;
use App\Modules\Room\Domain\ListAllNoRoom;
use App\Modules\Room\Domain\RoomRepository;
use App\Modules\Shared\Domain\DateEnd;
use App\Modules\Shared\Domain\DateStart;

final class RoomAllNoRoomLister
{
    public function __construct(private RoomRepository $repository) {}

    public function __invoke(
        string $dateStart,
        string $dateEnd,
        string $orderBy,
        string $orderType,
        array $idExtras,
        array $idTours,
        array $UpgradeStatuses,
        bool $allExtras,
        bool $allTours,
        bool $allUpgradeStatuses,
        int $idLocation,
        ?string $search,
        int $page,
        int $limit,
    ) {
        return $this->repository->search(new ListAllNoRoom(
            new DateStart($dateStart),
            new DateEnd($dateEnd),
            new RoomListOrderBy($orderBy),
            new RoomListOrderType($orderType),
            [],
            $idExtras,
            $idTours,
            $UpgradeStatuses,
            $allExtras,
            $allTours,
            $allUpgradeStatuses,
            new IdLocation($idLocation),
            $search,
            $page,
            $limit,
        ));
    }
}
