import { useId, useMemo } from 'react' import { joinTimeHHMM, splitTimeHHMM } from '../utils/logEntryPayload.js' import { preferNativeCameraPicker } from '../utils/captureVideoFrame.js' const HOURS = Array.from({ length: 24 }, (_, i) => String(i).padStart(2, '0')) const MINUTES = Array.from({ length: 60 }, (_, i) => String(i).padStart(2, '0')) interface EventTimeInput24hProps { value: string onChange: (value: string) => void disabled?: boolean 'aria-label'?: string } export default function EventTimeInput24h({ value, onChange, disabled = false, 'aria-label': ariaLabel }: EventTimeInput24hProps) { const baseId = useId() const useNativePicker = preferNativeCameraPicker() const { hours, minutes } = useMemo(() => splitTimeHHMM(value), [value]) const timeValue = useMemo(() => joinTimeHHMM(hours, minutes), [hours, minutes]) if (useNativePicker) { return (