'use client'; 'use strict'; var React = require('react'); function useUncontrolled({ value, defaultValue, finalValue, onChange = () => { } }) { const [uncontrolledValue, setUncontrolledValue] = React.useState( defaultValue !== void 0 ? defaultValue : finalValue ); const handleUncontrolledChange = (val, ...payload) => { setUncontrolledValue(val); onChange?.(val, ...payload); }; if (value !== void 0) { return [value, onChange, true]; } return [uncontrolledValue, handleUncontrolledChange, false]; } exports.useUncontrolled = useUncontrolled; //# sourceMappingURL=use-uncontrolled.cjs.map