import {Content, StepDragEnum, StepDragType} from "@/component/type";
import {getDropStoreId} from "@/component/CardItem";
import HttpEditComponent from "./edit"
import {StepComponentExport} from "@/component/step";
const name = "HttpStepComponent"
const tagStore = getDropStoreId()
interface HttpInterface extends Content{

}
const HttpData:HttpInterface = {
    content: "",
    id:0,
    label:"HTTP组件",
    remark:"",
    color:"red",
    tag:"POST",
    value:""
}
const defaultDataFunc = () =>{

    const data = {...HttpData}

    const store = tagStore()
    data.id = store.id
    // data.mold = name
    const defaultData:StepDragType<HttpInterface> = {
        mold:name,
        type:StepDragEnum.NODE,
        tag:store.tag,
        id:String(store.id),
        index:store.id,
        originalIndex:store.id,
        children:[],
        parent:null,
        data:data
    }
    return defaultData

}




const headerStepOption = {

}
const exportData:StepComponentExport = {
    Menu:{
        label:"HTTP",
        key:name,
        options:headerStepOption,
        component:HttpEditComponent
    },
    defaultDataFunc
}
export default exportData
