import { type IntlShape } from "react-intl"; import { type AccessGranularPermission, type IUser, type ObjRef } from "@gooddata/sdk-model"; import { type CurrentUserPermissions } from "../types.js"; import { type GranteeItem, type IGranteeGroupAll, type IGranteeInactiveOwner, type IGranteeRules } from "./types.js"; /** * @internal */ export declare const ADD_GRANTEE_ID = "add-grantee-id"; /** * @internal */ export declare const ADD_GRANTEE_SELECT_ID = "add-grantee-select-id"; /** * @internal */ export declare const ALL_WORKSPACE_USERS = "allWorkspaceUsers"; /** * @internal */ export declare const SHARE_LINK_HELPER_TEXT_ID = "share-link-helper-text"; /** * @internal */ export declare const SHARE_LINK_HEADLINE_ID = "share-link-headline"; /** * @internal */ export declare const GranteeRules: IGranteeRules; /** * @internal */ export declare const GROUP_ALL_ID = "groupAll"; /** * @internal */ export declare const GranteeGroupAll: IGranteeGroupAll; /** * @internal */ export declare const INACTIVE_OWNER_ID = "inactive_owner"; /** * @internal */ export declare const InactiveOwner: IGranteeInactiveOwner; /** * @internal */ export declare const getGranteeLabel: (grantee: GranteeItem, intl: IntlShape) => string; /** * @internal */ export declare const sortGranteesByName: (intl: IntlShape) => (granteeA: GranteeItem, granteeB: GranteeItem) => number; export declare const sortGranteeList: (grantees: GranteeItem[], intl: IntlShape) => GranteeItem[]; /** * @internal */ export declare const notInArrayFilter: (array: GranteeItem[], notInArray: GranteeItem[]) => GranteeItem[]; /** * @internal */ export declare const hasGroupAll: (array: GranteeItem[]) => boolean; /** * @internal */ export declare const hasGranteeRules: (array: GranteeItem[]) => boolean; /** * @internal */ export declare const getAppliedGrantees: (grantees: GranteeItem[], granteesToAdd: GranteeItem[], granteesToDelete: GranteeItem[]) => GranteeItem[]; /** * @internal */ export declare const getGranteeItemTestId: (grantee: GranteeItem, prefix?: "option") => string; /** * @internal */ export declare const getGranularGranteeClassNameId: (grantee: GranteeItem) => string; /** * @internal */ export declare const getGranularPermissionFromUserPermissions: (userPermissions: CurrentUserPermissions) => AccessGranularPermission | undefined; /** * Decide whether specific grantee is the currently logged in user. * * In some cases, current user might have uriRef instead of idRef or vice versa. This would result in * a false negative match. Method conveniently checks also user login to avoid such mismatch. * * @internal */ export declare const getIsGranteeCurrentUser: (granteeRef: ObjRef, currentUser: IUser) => boolean; //# sourceMappingURL=utils.d.ts.map