<?php
namespace Incoviba\Controller\Ventas;

use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Incoviba\Common\Alias\View;
use Incoviba\Service;

class Bonos
{
    public function show(ServerRequestInterface $request, ResponseInterface $response, View $view, Service\Venta $ventaService, int $venta_id): ResponseInterface
    {
        $venta = $ventaService->getById($venta_id);
        return $view->render($response, 'ventas.pies.bonos.show', compact('venta'));
    }
    public function add(ServerRequestInterface $request, ResponseInterface $response, View $view, Service\Venta $ventaService, int $venta_id): ResponseInterface
    {
        $venta = $ventaService->getById($venta_id);
        return $view->render($response, 'ventas.pies.bonos.add', compact('venta'));
    }
    public function edit(ServerRequestInterface $request, ResponseInterface $response, View $view, Service\Venta $ventaService, int $venta_id): ResponseInterface
    {
        $venta = $ventaService->getById($venta_id);
        return $view->render($response, 'ventas.pies.bonos.edit', compact('venta'));
    }
}
