import { PolylineEdge, PolylineEdgeModel } from "@logicflow/core";
const graphData = {
    nodes: [
        {
            id: '242b1b6c-1721-4b10-b4ad-c895094cf332',
            type: 'rect',
            x: 100,
            y: 100
        },
        {
            id: 'e59d6ecd-68f7-4d50-8e3f-29e67b6e5f16',
            type: 'circle',
            x: 300,
            y: 200
        }
    ],
    edges: [
        {
            sourceNodeId: '242b1b6c-1721-4b10-b4ad-c895094cf332',
            targetNodeId: 'e59d6ecd-68f7-4d50-8e3f-29e67b6e5f16',
            type: 'CustomEdge',
        }
    ]
}
class CustomEdgeModel extends PolylineEdgeModel {
    getEdgeStyle() {
        const style = super.getEdgeStyle();
        const { properties } = this;
        if (properties.isActived) {
            style.strokeDasharray = "4 4";
        }
        style.stroke = "orange";
        return style;
    }

    getTextStyle() {
        const style = super.getTextStyle();
        style.color = "#3451F1";
        style.fontSize = 20;
        style.background && (style.background.fill = "#F2F131");
        return style;
    }

    getOutlineStyle() {
        const style = super.getOutlineStyle();
        style.stroke = "red";
        style.hover && (style.hover.stroke = "red");
        return style;
    }
}
export default {
    type: "CustomEdge",
    // view: CustomEdgeNode,
    model: CustomEdgeModel,
}