import { useAuthStore } from '@/stores/useAuthStore' import { computed } from 'vue' export interface AuthOrganisationSummary { id: string name: string slug: string role: string } export interface AuthUserCookie { id: string name: string email: string roles?: string[] organisations?: AuthOrganisationSummary[] } /** * First organisation from the auth store (set at login). Super-admins still need an organisation context for nested event routes. */ export function useCurrentOrganisationId() { const authStore = useAuthStore() const organisationId = computed(() => authStore.user?.organisations?.[0]?.id ?? null) return { organisationId } }