<?php

declare(strict_types=1);

require_once __DIR__ . '/../includes/auth.php';
require_once __DIR__ . '/../includes/mvc.php';

use App\Controllers\ContractController;

$contractId = (int)($_GET['id'] ?? 0);
$controller = new ContractController();

if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    $controller->update($contractId);
    exit;
}

$controller->showEditForm($contractId);
