// See https://svelte.dev/docs/kit/types#app.d.ts
// for information about these interfaces
declare global {
	namespace App {
		// interface Error {}
		interface Locals {
			sessionId: string;
			user: { id: string; username: string; role: string; authSessionId: string } | null;
			isPro: boolean;
		}
		interface PageData {
			user?: { id: string; username: string; role: string; authSessionId: string } | null;
			isPro?: boolean;
		}
		// interface PageState {}
		// interface Platform {}
	}

	// Umami analytics — injected by the script tag in +layout.svelte when
	// PUBLIC_UMAMI_WEBSITE_ID is set. Optional so calls are no-ops in dev.
	interface Window {
		umami?: {
			track(event: string, data?: Record<string, unknown>): void;
		};
	}
}

export {};
