import { useState } from 'react';
export const useControlZoom = (initial) => {
    const [zoom, setZoom] = useState(initial);
    const handleSetZoom = (input) => {
        const direction = input === 'in' ? 1 : -1;
        setZoom(zoom + direction);
    };
    const handleSliderChange = (event, newValue) => {
        setZoom(newValue);
    };
    const handleInputChange = (event) => {
        setZoom(event.target.value === '' ? '' : Number(event.target.value));
    };
    return [zoom, handleSetZoom, handleSliderChange, handleInputChange];
};
export const usePosition = (initial) => {
    const [center, setCenter] = useState(initial);
    const handlePosition = (input) => {
        setCenter(input);
    };
    return [center, handlePosition];
};
//# sourceMappingURL=mapFunctions.js.map