<?php

namespace App\Http\Controllers\PaxInformationLink\PaxInformationRoom;

use App\Http\Controllers\Controller;
use App\Http\Helpers\ResponseBuilder;
use App\Modules\PaxInformationRoom\Application\Delete\DeletePaxInformationRoomQuery;
use App\Modules\Shared\Domain\Bus\Query\QueryBus;
use App\Modules\Shared\Domain\Transaction;

class PaxInformationRoomDeleteController extends Controller
{
    private $domain = "PaxInformationRoom";

    public function __construct(
        private QueryBus $queryBus,
        private Transaction $transaction
    ) {}

    public function __invoke($Id)
    {
        $this->queryBus->ask(new DeletePaxInformationRoomQuery($Id, 0));

        return ResponseBuilder::Response([
            "Response_Status"           => 200,
            "Response_Code"             => 200,
            "Response_Data"             => [],
            "Response_Domain"           => $this->domain,
            "Response_Message"          => 'Habitación eliminada con éxito',
            "Response_Error_Message"    => '',
            "Response_Error_Reason"     => '',
        ]);
    }
}
