import ViewControls from "./ViewControls.js";
import React, { useMemo } from "react";
import { useControls } from "react-zoom-pan-pinch";
//#region src/components/pisellFloorMapLayout/components/ViewControlsWithZoom.tsx
/**
* 在 TransformWrapper 内用 useControls 拿到 zoom 控制并渲染 ViewControls，确保点击加减能缩放
*/
function ViewControlsWithZoom(props) {
	const { zoomIn, zoomOut, resetTransform } = useControls();
	const api = useMemo(() => ({
		zoomIn,
		zoomOut,
		resetTransform,
		fitBounds: props.fitBounds,
		toggleFullscreen: props.toggleFullscreen
	}), [
		zoomIn,
		zoomOut,
		resetTransform,
		props.fitBounds,
		props.toggleFullscreen
	]);
	return /* @__PURE__ */ React.createElement(ViewControls, {
		api,
		config: props.config,
		scale: props.scale,
		isFullscreen: props.isFullscreen,
		fitBoundsActive: props.fitBoundsActive,
		mapGridVisible: props.mapGridVisible,
		onToggleMapGrid: props.onToggleMapGrid,
		edgesLayerVisible: props.edgesLayerVisible,
		onToggleEdgesLayer: props.onToggleEdgesLayer,
		viewportLocked: props.viewportLocked,
		onToggleViewportLock: props.onToggleViewportLock,
		dockChrome: props.dockChrome,
		dockExpandedToolButtons: props.dockExpandedToolButtons,
		dockExpandedTrailing: props.dockExpandedTrailing,
		autoCollapseDockMs: props.autoCollapseDockMs
	});
}
//#endregion
export { ViewControlsWithZoom };
