<?php

declare(strict_types=1);

namespace App\Controller\TblCiudad;

use App\CustomResponse as Response;
use Fig\Http\Message\StatusCodeInterface;
use Psr\Http\Message\ServerRequestInterface as Request;

final class Create extends Base
{
    public function __invoke(Request $request, Response $response): Response
    {
        $input = (array) $request->getParsedBody();
        $TblCiudad = $this->getTblCiudadService()->create($input);

        return $response->withJson($TblCiudad, StatusCodeInterface::STATUS_CREATED);
    }
}
