import { type IUser } from '@api-client/core/models/store/User.js';
import type { InvitationSchema } from '@api-client/core/models/store/Invitation.js';
import { Model } from '../core/Model.js';
import type SdkService from '../services/SdkService.js';
import { LiveData } from '../reactive/LiveData.js';
declare enum ModelState {
    /**
     * Not doing anything.
     */
    idle = 0,
    /**
     * Currently querying for file data.
     */
    reading = 1
}
export type OrgUser = InvitationSchema | IUser;
interface PageInfo {
    cursor?: string;
    ended: boolean;
}
export default class UsersModel extends Model<LiveData<OrgUser[]>> {
    #private;
    /**
     * The current state of the model.
     */
    state: ModelState;
    /**
     * The organization ID this model is associated with.
     */
    oid: string;
    /**
     * A reference to the SDK service used to perform API calls.
     */
    sdk: SdkService;
    /**
     * Pagination information for invitations.
     */
    invitationsInfo: PageInfo;
    /**
     * Pagination information for users.
     */
    usersInfo: PageInfo;
    get loading(): boolean;
    get value(): LiveData<OrgUser[]>;
    constructor(oid: string, sdk: SdkService);
    /**
     * Lists users in the organization.
     * It performs a paginated query to the API.
     * Call this method again to fetch the next page of results.
     */
    list(): Promise<void>;
    /**
     * Checks if the model has any users.
     * @returns True if there are users, false otherwise.
     */
    hasUsers(): boolean;
    /**
     * Finds a user by their key.
     */
    find(key: string): OrgUser | undefined;
    /**
     * Adds a user to the model.
     * @param user The user to add to the model.
     */
    add(user: OrgUser): void;
    /**
     * Replaces an existing user in the model.
     * If the user does not exist, it will be added.
     * @param key The key of the user to remove.
     */
    replace(user: OrgUser): void;
    /**
     * Removes a user from the model.
     * @param key The key of the user to remove.
     */
    remove(key: string): void;
    deactivate(uid: string): Promise<void>;
    activate(uid: string): Promise<void>;
    deleteUser(uid: string): Promise<void>;
    deleteInvitation(key: string): Promise<void>;
    resendInvitation(key: string): Promise<void>;
}
export {};
//# sourceMappingURL=UsersModel.d.ts.map