import { writable } from "svelte/store";

// ok yea this doesn't make a lot of sense, what am i trying to do?
// have an array of objects that are all the users?
// or an object that is the one user?
// For now as a placeholder i'll have one user in one obj

// should it not be a const? yea seems like it
// export const users = writable(
const UserStore = writable(
    [{
        // this is an example user
        id: 1,
        username: 'chaboi',
        email: 'nope@fu.com',
        // surely there's a better way to do this!
        password: '1234',
        // maybe an object listing friends' usernames?
        friends: 0,
        loggedIn: false,
        // i imagine the user uploading their Avatare and it being put somehwere in the DB which could be referenced like a URL
        // so if this field is empty then use the default avatar
        avatar: '',
        // online, offline, gaming
        status: 'offline',
    },
    {
        id: 2,
        username: 'itsame',
        email: 'mario@nintendo.com',
        // surely there's a better way to do this!
        password: '1234',
        // maybe an object listing friends' usernames?
        friends: 0,
        loggedIn: false,
        // i imagine the user uploading their Avatare and it being put somehwere in the DB which could be referenced like a URL
        // so if this field is empty then use the default avatar
        avatar: '',
        // online, offline, gaming
        status: 'offline',
    }]
);

export default UserStore;
// export default users;