import { type IUser, type ObjRef } from "@gooddata/sdk-model";
import { type DashboardSelector } from "../types.js";
/**
* This selector returns current logged in user.
*
* @remarks
* It is expected that the selector is called only after the permission state is correctly initialized.
* Invocations before initialization lead to invariant errors.
*
* @example - on how to use `selectCurrentUser` selector within a Dashboard Plugin.
* ```
* // create the component using current user selector
* const Greetings = () => {
* // read the currently logged in user information
* const user = useDashboardSelector(selectCurrentUser);
*
* return
Hello, {user.fullName}
;
* }
*
* // in a plugin's register function just use the component as a custom widget type
* customize.customWidgets().addCustomWidget("greetingsWidget", Greetings);
*
* customize.layout().customizeFluidLayout((_layout, customizer) => {
* customizer.addSection(
* 0,
* newDashboardSection(
* "Greetings by Plugin",
* newDashboardItem(newCustomWidget("greetings", "greetingsWidget"), {
* xl: {
* // all 12 columns of the grid will be 'allocated' for this new item
* gridWidth: 12,
* // minimum height since the custom widget now has just some one-liner text
* gridHeight: 1,
* },
* }),
* ),
* );
* });
*
* ```
*
* @returns - an {@link @gooddata/sdk-model#IUser} object for logged in user.
* @public
*/
export declare const selectCurrentUser: DashboardSelector;
/**
* This selector returns current logged in user ref.
*
* @remarks
* It is expected that the selector is called only after the permission state is correctly initialized.
* Invocations before initialization lead to invariant errors.
*
* @returns - an {@link @gooddata/sdk-model#ObjRef} of the logged in user.
* @public
*/
export declare const selectCurrentUserRef: DashboardSelector;
//# sourceMappingURL=userSelectors.d.ts.map