import { jsx as _jsx } from "react/jsx-runtime";
import { forwardRef } from 'react';
import { useConfiguration } from '../../hooks';
import Text from '../Text';
import NoValue from '../NoValue/NoValue';
import { formatDuration } from './utils';
const DurationDisplay = forwardRef(function DurationDisplay({ value, significantUnits = 4, unitDisplay = 'narrow', maxPrecision, ...restProps }, ref) {
    const { locale } = useConfiguration();
    return (_jsx(Text, { ref: ref, ...restProps, children: typeof value === 'number' ? (formatDuration(value, { locale, significantUnits, unitDisplay, maxPrecision })) : (_jsx(NoValue, {})) }));
});
export default DurationDisplay;
//# sourceMappingURL=DurationDisplay.js.map