import { writable } from 'svelte/store';

export interface Collective {
	id: string;
	name: string;
	emoji: string;
	created_at: string;
}

export interface CollectiveMember {
	user_id: string;
	collective_id: string;
	role: 'admin' | 'member' | 'guest';
	display_name: string;
	avatar_type: 'initials' | 'emoji' | 'upload';
	avatar_emoji: string | null;
	avatar_url: string | null;
}

export const currentCollective = writable<Collective | null>(null);
export const collectiveMembers = writable<CollectiveMember[]>([]);
export const userCollectives = writable<Collective[]>([]);
