<?= $this->extend('layouts/enterprise') ?>

<?= $this->section('content') ?>

<?= view('partials/workspace_hero', [
    'workspaceCrumbPill'    => 'Transport',
    'workspaceCrumbCurrent' => 'Edit Contract Site',
    'workspaceTitle'        => 'Edit Contract Site',
    'workspaceDesc'         => esc($site['contract_title'] ?? ''),
]) ?>

<article class="enterprise-settings-card" style="max-width:860px;">
    <div class="enterprise-settings-card__head">
        <i class="fa-solid fa-building-flag"></i>
        <h2 class="enterprise-settings-card__title">
            <?= esc($site['contract_title'] ?? 'Contract') ?>
            <small class="text-muted"><code><?= esc($site['contract_number'] ?? '') ?></code></small>
        </h2>
    </div>

    <?= $this->include('Modules\Transport\Views\partials\form_errors') ?>

    <form action="<?= base_url('transport/ai/contract-sites/' . $site['id']) ?>" method="post" novalidate>
        <?= csrf_field() ?>
        <div class="enterprise-settings-fields">
            <?= $this->include('Modules\Transport\Views\ai\contract_sites\_form') ?>
        </div>
        <div class="enterprise-settings-card__footer">
            <a href="<?= base_url('transport/ai/contract-sites') ?>" class="btn btn-outline-secondary">Cancel</a>
            <button type="submit" class="btn btn-primary">Update Mapping</button>
        </div>
    </form>
</article>

<?= $this->endSection() ?>
