<?php
require __DIR__ . '/../lib/availability.php';

$r = availability_get_slots(1, 2, date('Y-m-d'), null, true);
echo "slots today service 2: " . count($r['slots']) . "\n";
if ($r['slots']) {
    echo "first: {$r['slots'][0]['time']} {$r['slots'][0]['staff_name']}\n";
}
$f = availability_first_available(1, 1, null, 14);
echo $f['ok']
    ? "first available: {$f['date']} {$f['slot']['time']} {$f['slot']['staff_name']}\n"
    : ("none: " . ($f['error'] ?? '') . "\n");
