import Title from "./title.js"
import Network from "./network.js"
import Member from './member.js'
import Payment from "./payment.js"
import Post from "./forum/post.js"
import Conversation from "./dms/conversation.js"
import DM from "./dms/dm.js"
import MEMBER_IN_NETWORK from "./edges/MEMBER_IN_NETWORK.js"
import POST_FROM_NETWORK from "./edges/POST_FROM_NETWORK.js"
import POST_BY_MEMBER from "./edges/POST_BY_MEMBER.js"

let nIndices = {
    "MEMBER" :          [0, 0], // [id, startIndex, nextEmptyIndex
    "NETWORK" :         [100, 100],
    "TITLE" :           [200, 200],
    "PAYMENT" :         [300, 300],
    "POST" :            [400, 400],
    "CONVERSATION" :    [3000, 3000],
    "DM" :              [6000, 6000],
}

let eIndices = {
    "MEMBER_IN_NETWORK": [0, 0],
    "POST_FROM_NETWORK": [4000, 4000],
    "POST_BY_MEMBER": [7000, 7000]
}

export let nodeModels = { 
    MEMBER:         new Member(nIndices.MEMBER),
    NETWORK:        new Network(nIndices.NETWORK),
    TITLE:          new Title(nIndices.TITLE),
    PAYMENT:        new Payment(nIndices.PAYMENT),
    POST:           new Post(nIndices.POST),
    CONVERSATION:   new Conversation(nIndices.CONVERSATION),
    DM:             new DM(nIndices.DM),
}

export let edgeModels = {
    MEMBER_IN_NETWORK: new MEMBER_IN_NETWORK(eIndices.MEMBER_IN_NETWORK),
    POST_FROM_NETWORK: new POST_FROM_NETWORK(eIndices.POST_FROM_NETWORK),
    POST_BY_MEMBER: new POST_BY_MEMBER(eIndices.POST_BY_MEMBER)
}