<?php

namespace App\Http\Controllers\Owner\WebChannel;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Http\Helpers\ResponseBuilder;
use App\Http\History\HistoryData;
use App\Http\History\HistoryTables;
use App\Modules\Leads\WebChannel\Application\Delete\DeleteWebChannelQuery;
use App\Modules\Shared\Domain\Bus\Query\QueryBus;
use App\Modules\Shared\Domain\Transaction;

class WebChannelDeleteController extends Controller
{
    private $domain = "WebChannel";

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

    public function __invoke($Id)
    {
        $this->queryBus->ask(new DeleteWebChannelQuery($Id));

        return ResponseBuilder::Response([
            "Response_Status"           => 200,
            "Response_Code"             => 200,
            "Response_Data"             => [],
            "Response_Domain"           => $this->domain,
            "Response_Message"          => 'Tipo de servicio eliminado con éxito',
            "Response_Error_Message"    => '',
            "Response_Error_Reason"     => '',
        ]);
    }
}