<?php
declare(strict_types=1);require dirname(__DIR__).'/core/bootstrap.php';
$id=(int)($_GET['service_id']??0);if($id<1)json_response(['durations'=>[]]);
$stmt=db()->prepare('SELECT id,label,duration_minutes,price FROM service_durations WHERE service_id=? AND is_active=1 ORDER BY sort_order,duration_minutes');$stmt->execute([$id]);
json_response(['durations'=>$stmt->fetchAll()]);
