"use strict";
var __webpack_require__ = {};
(()=>{
    __webpack_require__.d = (exports1, definition)=>{
        for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
            enumerable: true,
            get: definition[key]
        });
    };
})();
(()=>{
    __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
})();
(()=>{
    __webpack_require__.r = (exports1)=>{
        if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
            value: 'Module'
        });
        Object.defineProperty(exports1, '__esModule', {
            value: true
        });
    };
})();
var __webpack_exports__ = {};
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
    MiniCanvasNavigator: ()=>MiniCanvasNavigator
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
const react_cjs_namespaceObject = require("../../xyflow/react.cjs");
const external_react_namespaceObject = require("react");
const index_cjs_namespaceObject = require("../BaseCanvas/index.cjs");
const MiniCanvasNavigator = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ previousCanvas, currentCanvasId, nodeTypes, onNodeClick })=>{
    const nodes = (0, external_react_namespaceObject.useMemo)(()=>previousCanvas.nodes.map((node)=>{
            const isSelected = node.data?.childCanvasId === currentCanvasId;
            return {
                ...node,
                selected: isSelected,
                style: {
                    ...node.style,
                    cursor: node.data?.childCanvasId ? 'pointer' : 'default',
                    opacity: node.data?.childCanvasId ? isSelected ? 1 : 0.8 : 0.6
                }
            };
        }), [
        previousCanvas.nodes,
        currentCanvasId
    ]);
    return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
        style: {
            width: 300,
            height: 200,
            background: 'var(--canvas-background)',
            border: '1px solid var(--canvas-border-grid)',
            borderRadius: 8,
            boxShadow: '0 2px 8px rgba(0, 0, 0, 0.1)'
        },
        children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_cjs_namespaceObject.ReactFlowProvider, {
            children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_cjs_namespaceObject.BaseCanvas, {
                nodes: nodes,
                edges: previousCanvas.edges,
                nodeTypes: nodeTypes,
                fitView: true,
                fitViewOptions: {
                    padding: 0.1,
                    duration: 0
                },
                mode: "view",
                showBackground: false,
                onNodeClick: onNodeClick,
                panOnDrag: false,
                zoomOnDoubleClick: false,
                zoomOnScroll: false,
                zoomOnPinch: false,
                nodesDraggable: false,
                nodesConnectable: false,
                elementsSelectable: false
            }, previousCanvas.id)
        })
    });
});
MiniCanvasNavigator.displayName = 'MiniCanvasNavigator';
exports.MiniCanvasNavigator = __webpack_exports__.MiniCanvasNavigator;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "MiniCanvasNavigator"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
