import type { Invitation } from "@stigmer/protos/ai/stigmer/iam/invitation/v1/api_pb";
/** Props for {@link InvitationRedemption}. */
export interface InvitationRedemptionProps {
    /** The invitation token from the invite URL. */
    readonly token: string;
    /**
     * Whether the current user is authenticated.
     *
     * Controls the button's click behavior, not its label. Both
     * states show "Accept Invitation". When `false`, clicking
     * fires {@link onAuthRequired} to initiate the auth flow.
     * When `true` or omitted, clicking redeems the invitation
     * directly.
     *
     * @default true
     */
    readonly isAuthenticated?: boolean;
    /**
     * When `true`, automatically triggers invitation redemption
     * on mount (requires `isAuthenticated` to also be `true`).
     *
     * Used by host applications to complete the acceptance flow
     * after an OIDC redirect — the user clicked "Accept Invitation"
     * before the redirect, so no second click should be required.
     *
     * @default false
     */
    readonly autoAccept?: boolean;
    /**
     * Fired after the invitation is successfully redeemed.
     *
     * The returned {@link Invitation} contains the organization and
     * role information needed for post-redemption navigation
     * (e.g. redirecting to the org dashboard).
     */
    readonly onAccepted?: (invitation: Invitation) => void;
    /**
     * Fired when an unauthenticated user clicks "Accept Invitation".
     *
     * The host application controls what happens next — this
     * callback typically triggers a redirect to the OIDC provider
     * with a return URL back to the invite page.
     */
    readonly onAuthRequired?: () => void;
    /** Additional CSS class names for the root container. */
    readonly className?: string;
}
/**
 * Self-contained invite acceptance flow.
 *
 * Fetches the invitation preview by token (public endpoint, no auth
 * required), displays the organization info and role being offered,
 * and provides an accept button that redeems the invitation.
 *
 * Handles all states: loading, invalid (expired / revoked / fully
 * redeemed), authentication required, redemption in flight,
 * success, and error — with appropriate UX for each.
 *
 * The component is auth-agnostic: it delegates authentication
 * decisions to the host application via `isAuthenticated` and
 * `onAuthRequired` props. The button always reads "Accept Invitation"
 * regardless of auth state — `isAuthenticated` only controls whether
 * clicking redeems directly or triggers the auth flow first.
 *
 * When `autoAccept` is `true` and the user is authenticated, the
 * component automatically triggers redemption on mount. This enables
 * a seamless post-OIDC-redirect flow where the user doesn't need
 * to click "Accept Invitation" a second time.
 *
 * All visual properties flow through `--stgm-*` design tokens.
 *
 * @example
 * ```tsx
 * <InvitationRedemption
 *   token={tokenFromUrl}
 *   onAccepted={(inv) => router.push("/dashboard")}
 * />
 *
 * <InvitationRedemption
 *   token={tokenFromUrl}
 *   isAuthenticated={!!currentUser}
 *   autoAccept={shouldAutoAccept}
 *   onAccepted={(inv) => router.push(`/org/${inv.metadata?.org}`)}
 *   onAuthRequired={() => redirectToLogin()}
 * />
 * ```
 */
export declare function InvitationRedemption({ token, isAuthenticated, autoAccept, onAccepted, onAuthRequired, className, }: InvitationRedemptionProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=InvitationRedemption.d.ts.map