"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__, {
    EdgePath: ()=>EdgePath
});
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
const external_constants_cjs_namespaceObject = require("../constants.cjs");
const { INTERACTION_STROKE_WIDTH, STROKE_WIDTH, SELECTED_STROKE_WIDTH, SELECTED_OUTLINE_STROKE_WIDTH, SELECTED_OUTLINE_OPACITY } = external_constants_cjs_namespaceObject.EDGE_CONSTANTS;
function EdgePath(props) {
    const { d, color, selected, animated, strokeStyle, isReadOnly, pathRef, id, style, opacity = 1 } = props;
    const dasharray = animated ? void 0 : 'dashed' === strokeStyle ? external_constants_cjs_namespaceObject.EDGE_DASHARRAY.dashed : external_constants_cjs_namespaceObject.EDGE_DASHARRAY.solid;
    const strokeWidth = style?.strokeWidth ?? (selected ? SELECTED_STROKE_WIDTH : STROKE_WIDTH);
    return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
        children: [
            /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
                className: "react-flow__edge-interaction",
                d: d,
                fill: "none",
                stroke: "transparent",
                strokeWidth: INTERACTION_STROKE_WIDTH,
                style: {
                    pointerEvents: 'stroke',
                    cursor: isReadOnly ? 'default' : 'pointer'
                }
            }),
            selected && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
                className: "react-flow__edge-outline",
                d: d,
                fill: "none",
                stroke: external_constants_cjs_namespaceObject.EDGE_COLORS.selected,
                strokeWidth: SELECTED_OUTLINE_STROKE_WIDTH,
                opacity: SELECTED_OUTLINE_OPACITY,
                style: {
                    pointerEvents: 'none',
                    transition: 'opacity 0.2s ease'
                }
            }),
            /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("path", {
                id: id,
                ref: pathRef,
                className: "react-flow__edge-path",
                d: d,
                fill: "none",
                strokeWidth: strokeWidth,
                style: {
                    stroke: color,
                    strokeDasharray: dasharray,
                    opacity,
                    transition: external_constants_cjs_namespaceObject.EDGE_PATH_TRANSITION
                }
            })
        ]
    });
}
exports.EdgePath = __webpack_exports__.EdgePath;
for(var __rspack_i in __webpack_exports__)if (-1 === [
    "EdgePath"
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
Object.defineProperty(exports, '__esModule', {
    value: true
});
