import { type GranteeAvatarKind } from "../UiGranteeAvatar/UiGranteeAvatar.js";
import { type PermissionMenuLevel } from "../UiPermissionMenu/UiPermissionMenu.js";
/**
 * One pickable user or group entry.
 *
 * @internal
 */
export interface IUiGranteeAsyncOption {
    /** Stable identifier — used as the React key and as the value passed to `onSelect`. */
    id: string;
    /** Avatar variant. */
    kind: GranteeAvatarKind;
    /** Display name shown on the row. */
    name: string;
    /** Optional email subline (users only). */
    email?: string;
}
/**
 * A previously-picked grantee with its current permission level.
 *
 * @internal
 */
export interface IUiPickedGrantee extends IUiGranteeAsyncOption {
    /** Permission level chosen for this grantee. Drives the row's permission menu trigger label. */
    permissionLevel: PermissionMenuLevel;
}
/**
 * Result returned by the consumer's loader: separate `groups` and `users` arrays
 * so the dropdown can render the two sections independently. Either may be empty.
 *
 * @internal
 */
export interface IUiGranteeAsyncOptions {
    groups: IUiGranteeAsyncOption[];
    users: IUiGranteeAsyncOption[];
}
/**
 * @internal
 */
export interface IUiGranteeAsyncPickerProps {
    /**
     * Loader called whenever the (debounced) search query changes. The empty
     * string is passed on mount to populate the initial dropdown. Pagination
     * is intentionally not exposed at this layer — the loader returns the
     * full search result and the consumer caps backend results elsewhere.
     */
    loadOptions: (search: string) => Promise<IUiGranteeAsyncOptions>;
    /**
     * Grantees already picked. Rendered below the search input as `UiGranteeRow`s
     * with a `UiPermissionMenu` trigger and a Remove action. Also filtered out
     * of the dropdown so the user cannot pick the same grantee twice.
     */
    selectedGrantees?: ReadonlyArray<IUiPickedGrantee>;
    /** Fires when the user picks an option from the dropdown. */
    onSelect: (option: IUiGranteeAsyncOption) => void;
    /** Fires when the user changes the permission level on a picked row. */
    onPermissionChange?: (grantee: IUiPickedGrantee, next: PermissionMenuLevel) => void;
    /** Fires when the user picks Remove access in the row's permission menu. */
    onRemove?: (grantee: IUiPickedGrantee) => void;
    /** Test id forwarded to the root element. */
    dataTestId?: string;
}
/**
 * Sectioned async grantee picker — specialization of `UiAutocomplete` for the
 * share/access-control domain. Renders a search input with a dropdown split
 * into `Groups` and `Users` sections, and a list of picked grantees below
 * (each as a `UiGranteeRow` with a `UiPermissionMenu` trigger). The
 * permission menu carries the Remove action; consumers wire it via `onRemove`.
 *
 * @internal
 */
export declare function UiGranteeAsyncPicker({ loadOptions, selectedGrantees, onSelect, onPermissionChange, onRemove, dataTestId }: IUiGranteeAsyncPickerProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=UiGranteeAsyncPicker.d.ts.map