/**
 * Reactive state for admin invite management.
 *
 * Flows every operation through an injected `AdminInvitesRpc` adapter — the
 * class stays decoupled from the concrete RPC client so tests can inject
 * plain-function stubs. Mirrors `AdminAccountsRpc` / `AuditLogRpc`.
 *
 * Holds two `AsyncSlot`s — `list` (fetch) and `create` (singular write) —
 * plus one `KeyedAsyncSlot<Uuid>` (`remove`) for the per-row delete with
 * correct per-row supersession and per-row error surfacing. Method names
 * use the `submit_*` prefix to avoid slot-name collisions (`delete` is
 * reserved at top-level positions; renamed for symmetry).
 *
 * @module
 */
import type { Uuid } from '@fuzdev/fuz_util/id.js';
import { AsyncSlot } from './async_slot.svelte.js';
import { KeyedAsyncSlot } from './keyed_async_slot.svelte.js';
import type { InviteWithUsernamesJson } from '../auth/invite_schema.js';
import type { InviteCreateInput, InviteCreateOutput, InviteDeleteInput, InviteDeleteOutput, InviteListOutput } from '../auth/admin_action_specs.js';
/**
 * Narrow RPC surface consumed by `AdminInvitesState`. Consumers adapt their
 * typed RPC client to this shape. `error.data.reason` on thrown errors
 * carries the `ERROR_INVITE_*` constant — handled by the caller when
 * user-friendly messages are needed. Method signatures track the wire
 * spec types directly so the adapter needs no casts.
 */
export interface AdminInvitesRpc {
    list: () => Promise<InviteListOutput>;
    create: (params: InviteCreateInput) => Promise<InviteCreateOutput>;
    delete: (params: InviteDeleteInput) => Promise<InviteDeleteOutput>;
}
/**
 * Svelte context carrying the reactive `AdminInvitesRpc` accessor. Mirrors
 * `admin_accounts_rpc_context`. `get()` throws when no provisioner ran above
 * the component — the adapter is required.
 */
export declare const admin_invites_rpc_context: {
    get: (error_message?: string) => () => AdminInvitesRpc;
    get_maybe: () => (() => AdminInvitesRpc) | undefined;
    set: (value: () => AdminInvitesRpc) => () => AdminInvitesRpc;
};
export interface AdminInvitesStateOptions {
    /** Reactive accessor for the RPC adapter. */
    get_rpc: () => AdminInvitesRpc;
}
export declare class AdminInvitesState {
    #private;
    readonly list: AsyncSlot<void, string>;
    readonly create: AsyncSlot<void, string>;
    readonly remove: KeyedAsyncSlot<string & import("zod").$brand<"Uuid">, void, string>;
    invites: Array<InviteWithUsernamesJson>;
    readonly invite_count: number;
    readonly unclaimed_count: number;
    constructor(options: AdminInvitesStateOptions);
    fetch(): Promise<void>;
    submit_create(email?: string, username?: string): Promise<boolean>;
    submit_delete(id: Uuid): Promise<void>;
}
//# sourceMappingURL=admin_invites_state.svelte.d.ts.map