import React from "react";
export const DEFAULT_CONTROLLER_OPTIONS = {
    doubleClickZoom: false,
    inertia: 300,
    scrollZoom: {
        speed: 0.008,
        smooth: false,
    },
};
export const useVerticalScale = (viewports) => {
    return React.useMemo(() => {
        var _a;
        if (!viewports) {
            return 1;
        }
        return (_a = viewports.find((item) => !!item.verticalScale)) === null || _a === void 0 ? void 0 : _a.verticalScale;
    }, [viewports]);
};
export const defineController = (controllerClass, controllerProps) => {
    if (controllerProps === false) {
        return controllerProps;
    }
    if (controllerProps === undefined || controllerProps === true) {
        return Object.assign({ type: controllerClass }, DEFAULT_CONTROLLER_OPTIONS);
    }
    return Object.assign(Object.assign({ type: controllerClass }, DEFAULT_CONTROLLER_OPTIONS), controllerProps);
};
//# sourceMappingURL=viewport.js.map