import {HJInterNodeData, HJPosition} from "../../types/comTypes";
import { ref } from 'vue'
import { HJNodeType} from '../../types/comTypes'


export const dragNodes = ref<HJInterNodeData[]>(
    [
        {
            type: HJNodeType.custom,
            data: {
                label: "普通上1下1",
                handles: [
                    {
                        type: 'source',
                        position: HJPosition.Bottom,

                    },
                    {
                        type: 'target',
                        position: HJPosition.Top,
                    }
                ]
            }
        },
        {
            type: HJNodeType.nest,
            data: {
                label: "左2 右1",
                handles: [
                    {
                        type: 'source',
                        position: HJPosition.Left,
                        style: {
                            top: '10px'
                        }
                    },
                    {
                        type: 'source',
                        position: HJPosition.Left,
                        style: {
                            top: 'auto',
                            bottom: '10px'
                        }
                    },
                    {
                        type: 'target',
                        position: HJPosition.Right,
                    }
                ]
            }
        },
        {
            type: HJNodeType.custom,
            data: {
                label: "上2 下3",
                handles: [
                    {
                        type: 'source',
                        position: HJPosition.Top,
                        style: {
                            left: '10px'
                        }
                    },
                    {
                        type: 'source',
                        position: HJPosition.Top,
                        style: {
                            left: 'auto',
                            right: '10px'
                        }
                    },
                    {
                        type: 'target',
                        position: HJPosition.Bottom,
                        style: {

                             left: '10px'
                        }
                    },
                    {
                        type: 'target',
                        position: HJPosition.Bottom,
                        style: {
                            left: '50%'
                        }
                    },
                    {
                        type: 'target',
                        position: HJPosition.Bottom,
                        style: {
                            left: 'auto',
                             right: '10px'
                        }
                    }


                ]
            }
        },
        {
            type: HJNodeType.nest,
            data: {
                label: "左三右二",
                handles: [
                    {
                        type: 'source',
                        position: HJPosition.Left,
                        style: {
                            top: '10px'
                        }
                    },
                    {
                        type: 'source',
                        position: HJPosition.Left,
                        style: {
                            top: 'auto',
                            bottom: '10px'
                        }
                    },
                    {
                        type: 'source',
                        position: HJPosition.Left,
                        style: {
                            top: '50%',
                            // bottom: '10px'
                        }
                    },
                    {
                        type: 'target',
                        position: HJPosition.Right,
                        style: {
                            top: '10px'
                        }
                    },
                    {
                        type: 'target',
                        position: HJPosition.Right,
                        style: {
                            top: '50%',
                            // bottom: '10px'
                        }
                    }


                ]
            }
        },
        {
            type: HJNodeType.numberInput,
            data: {
                label: "Node 3",
            }
        },
        {
            type: HJNodeType.numberFunction,
            data: {
                label: "Node 4",
            }
        },
        {
            type: HJNodeType.numberResult,
            data: {
                label: "Node 5",
            }
        },
    ]
)
