import React from 'react';
import { Controlled } from './Controlled.mjs';

function Uncontrolled({ onZoomChange, ...props }) {
    const [isZoomed, setIsZoomed] = React.useState(false);
    const handleZoomChange = React.useCallback((value, { event }) => {
        setIsZoomed(value);
        onZoomChange?.(value, { event });
    }, [onZoomChange]);
    return (React.createElement(Controlled, { ...props, isZoomed: isZoomed, onZoomChange: handleZoomChange }));
}

export { Uncontrolled };
