<?php

require_once __DIR__ . '/auth.php';

function get_selected_vessel_id(): ?int
{
    start_session_if_needed();
    return isset($_SESSION['vessel_id']) ? (int)$_SESSION['vessel_id'] : null;
}

function set_selected_vessel_id(int $vesselId): void
{
    start_session_if_needed();
    $_SESSION['vessel_id'] = $vesselId;
}
