'use client';
import { useState, useEffect } from 'react';
export function useDebounce(value, delayMs) {
    const [debouncedValue, setDebouncedValue] = useState(value);
    useEffect(() => {
        const timer = setTimeout(() => setDebouncedValue(value), delayMs);
        return () => clearTimeout(timer);
    }, [value, delayMs]);
    return debouncedValue;
}
//# sourceMappingURL=useDebounce.js.map