const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_ViewControls = require("./ViewControls.js");
let react = require("react");
react = require_runtime.__toESM(react);
let react_zoom_pan_pinch = require("react-zoom-pan-pinch");
//#region src/components/pisellFloorMapLayout/components/ViewControlsWithZoom.tsx
/**
* 在 TransformWrapper 内用 useControls 拿到 zoom 控制并渲染 ViewControls，确保点击加减能缩放
*/
function ViewControlsWithZoom(props) {
	const { zoomIn, zoomOut, resetTransform } = (0, react_zoom_pan_pinch.useControls)();
	const api = (0, react.useMemo)(() => ({
		zoomIn,
		zoomOut,
		resetTransform,
		fitBounds: props.fitBounds,
		toggleFullscreen: props.toggleFullscreen
	}), [
		zoomIn,
		zoomOut,
		resetTransform,
		props.fitBounds,
		props.toggleFullscreen
	]);
	return /* @__PURE__ */ react.default.createElement(require_ViewControls.default, {
		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
exports.ViewControlsWithZoom = ViewControlsWithZoom;
