import { TemplateResult, LitElement, nothing } from 'lit';
import type { AuthProviders } from '@api-client/core/sdk/AuthSdk.js';
import type { InvitationSchema } from '@api-client/core/models/store/Invitation.js';
import { type IOrganization } from '../../../providers/organization.js';
export declare enum State {
    /**
     * The initial state (default).
     *
     * Next possible states:
     * - `Initialized`
     * - `Error`
     */
    Initializing = "initializing",
    /**
     * The state when an error occurred.
     * In this state, set the `errors` property to show error details.
     * There are no next possible states from here, the parent app has to reset the flow.
     */
    Error = "error",
    /**
     * State after the app initialization is complete.
     * It means that the app has read all necessary config but has not yet fetched invitation data.
     *
     * Next possible states:
     * - `ReadingStatus`
     */
    Initialized = "initialized",
    /**
     * The state when the application is fetching invitation data.
     * The component renders the loading indicator in this state.
     *
     * Next possible states:
     * - `Login`
     * - `Error`
     */
    ReadingStatus = "reading-status",
    /**
     * The main interaction state where the user can choose to log in (accept) or decline.
     *
     * Next possible states:
     * - `Rejecting`
     * - `InvitationAccepted`
     * - `InvitationDeclined`
     * - `Error`
     */
    Login = "login",
    /**
     * The state when the rejection request is being processed.
     *
     * Next possible states:
     * - `Rejected`
     * - `Error`
     */
    Rejecting = "rejecting",
    /**
     * The state when the invitation has been rejected by the user in the current session.
     *
     * There are no next possible states from here, the parent app has to reset the flow.
     */
    Rejected = "rejected",
    /**
     * The state when the invitation has been successfully accepted.
     * This state can be set after reading the invitation status that was already accepted previously.
     *
     * There are no next possible states from here, the parent app has to reset the flow.
     */
    InvitationAccepted = "invitation-accepted",
    /**
     * The state when the invitation is found to be deleted or invalid.
     *
     * There are no next possible states from here, the parent app has to reset the flow.
     */
    InvitationDeleted = "invitation-deleted",
    /**
     * The state when the invitation was already declined previously.
     *
     * There are no next possible states from here, the parent app has to reset the flow.
     */
    InvitationDeclined = "invitation-declined",
    /**
     * The state when the invitation has expired.
     *
     * There are no next possible states from here, the parent app has to reset the flow.
     */
    InvitationExpired = "invitation-expired"
}
/**
 * An App screen (HTML Element) allowing the user to accept an invitation to join an organization.
 *
 * This component handles the UI for invitation acceptance flow.
 * It does not implement the actual invitation logic but dispatches events. However, the state can be set
 * via the `state` property to reflect the current status.
 *
 * The parent app has to handle the invitation acceptance logic and update the state accordingly.
 *
 * When it comes to the user flow, the user can either accept or decline the invitation. To accept the
 * initivation the user has to log in through one of the supported providers (Google, GitHub, LinkedIn).
 * After successful login, the invitation is accepted. If the user declines the invitation, the invitation
 * is rejected immediately.
 *
 * @fires authenticate - Dispatched when the user clicks on one of the authentication buttons.
 *                       The detail object `CustomEvent<{ provider: AuthProviders }>` contains the selected provider.
 * @fires reject - Dispatched when the user clicks the "Decline" button.
 * @fires open - Dispatched when the user clicks the "Open organization" button
 *               after a successful acceptance (state `InvitationAccepted`).
 *
 * @example
 * ```html
 * <invitation-screen
 *   .state="${this.invitationState}"
 *   .invitation="${this.invitationData}"
 *   ?google="${true}"
 *   @authenticate="${this.handleAuth}"
 *   @reject="${this.handleReject}"
 * ></invitation-screen>
 * ```
 */
export default class InvitationScreen extends LitElement {
    /**
     * This is the main state definition that controls what is rendered on the screen.
     * It can be one of the `State` enum values.
     *
     * @attribute
     */
    accessor state: State;
    /**
     * When set it renders the Google login button. Disabled by default.
     * @attribute
     */
    accessor google: boolean;
    /**
     * When set it renders the LinkedIn login button. Disabled by default.
     * @attribute
     */
    accessor linkedin: boolean;
    /**
     * When set it renders the GitHub login button. Disabled by default.
     * @attribute
     */
    accessor github: boolean;
    /**
     * The list of errors to display.
     */
    accessor errors: string[] | undefined;
    /**
     * The invitation details retreived from the backend.
     * This property must be set for the component to function correctly.
     */
    accessor invitation: InvitationSchema | undefined;
    /**
     * The fetched organization details for which the invitation is valid.
     *
     * This property consumes the `organizationContext`.
     */
    accessor organization: IOrganization | undefined;
    /**
     * Dispatches the authentication event for the selected provider.
     *
     * @param provider The authentication provider to use.
     */
    protected dispatchAuth(provider: AuthProviders): void;
    protected authenticateGoogle(): void;
    protected authenticateGithub(): void;
    protected authenticateLinkedin(): void;
    /**
     * Handles the click on the "Open organization" button after accepting the invitation.
     */
    protected handleAcceptedOpen(): void;
    /**
     * Handles the click on the "Decline" button to reject the invitation.
     */
    protected handleReject(): void;
    protected render(): unknown;
    renderPage(): TemplateResult;
    protected renderCheckingUser(): TemplateResult;
    protected renderInto(): TemplateResult;
    protected renderLoginForm(): TemplateResult;
    protected renderRejecting(): TemplateResult;
    protected renderRejected(): TemplateResult;
    protected renderError(): TemplateResult;
    protected renderInvitationAccepted(): TemplateResult;
    protected renderInvitationDeclined(): TemplateResult;
    protected renderInvitationDeleted(): TemplateResult;
    protected renderInvitationExpired(): TemplateResult;
    protected renderGoogleButton(): TemplateResult | typeof nothing;
    protected renderGithubButton(): TemplateResult | typeof nothing;
    protected renderLinkedinButton(): TemplateResult | typeof nothing;
}
//# sourceMappingURL=InvitationScreen.d.ts.map