import { writable } from 'svelte/store';

function createSurfers() {
    const { subscribe, set, update } = writable([
        { color: 'gray', priority: '' },
        { color: 'gray', priority: '' },
        { color: 'gray', priority: '' },
        { color: 'gray', priority: '' },
        { color: 'gray', priority: '' },
        { color: 'gray', priority: '' },
    ])
    return {
        subscribe,
        set,
        update,
        reset: () => set([
            { color: 'gray', priority: '' },
            { color: 'gray', priority: '' },
            { color: 'gray', priority: '' },
            { color: 'gray', priority: '' },
            { color: 'gray', priority: '' },
            { color: 'gray', priority: '' },
        ]),
    }
}

export const surfers = createSurfers()

export const surfersCount = writable(4)