import { CurrentUserState } from "@trackunit/iris-app-runtime-core-api"; /** * Hook providing the authenticated user's profile, account, and permission data * from the CurrentUserContext. * * ### When to use * Use `useCurrentUser` when you need the user's identity or account context — displaying * the user's name, resolving the effective account ID, or branching logic based on * `isAssuming` or `isTrackunitUser`. * * ### When not to use * - If you only need a boolean check for a single permission — use `useUserPermission`. * - To gate entire routes — prefer server-side access control or `hasAccessTo` from * `useNavigateInHost`. * * @example * import { useCurrentUser } from "@trackunit/react-core-hooks"; * const { assumedUser, accountId } = useCurrentUser(); * * const { data, loading } = useGetAccountByIdQuery({ * variables: { accountId: assumedUser?.accountId || accountId || "" }, * }); * @see { CurrentUserContext} */ export declare const useCurrentUser: () => CurrentUserState;