// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
import type { SupabaseClient, Session, User } from '@supabase/supabase-js';
import type { Database, MemberWithDues } from '$lib/types/database';

declare global {
	namespace App {
		// interface Error {}
		interface Locals {
			supabase: SupabaseClient<Database>;
			safeGetSession: () => Promise<{
				session: Session | null;
				user: User | null;
				member: MemberWithDues | null;
			}>;
		}
		interface PageData {
			session: Session | null;
			user: User | null;
			member: MemberWithDues | null;
		}
		// interface PageState {}
		// interface Platform {}
	}
}

export {};
