import { type TemplateResult, nothing } from 'lit';
import { type CookieConfiguration, type DomainEntity, type JwtConfiguration, type SessionConfiguration, type ApiModel, type DomainProperty } from '@api-client/core/browser.js';
import { ApiModelingScreen } from './ApiModelingScreen.js';
import type { UiSelectChangeEvent } from '../../md/select/ui-select.js';
import type { UiMenuItemElement } from '../../md/menu/ui-menu-item.js';
interface MissingDomainProperty {
    missing: true;
    key: string;
    namespace?: string;
}
/**
 * An API Modeling screen for configuring session management.
 * It allows to:
 * - Select the User entity.
 * - Add session properties from the User entities that are available during the request lifecycle.
 * - Generate session tokens and configure their settings.
 * - Select session transport method.
 */
export default class ApiModelingSessionScreen extends ApiModelingScreen {
    /**
     * All available entities to list the user object from.
     */
    accessor entities: DomainEntity[];
    /**
     * The data model for the user object.
     */
    accessor userModel: DomainEntity | undefined;
    /**
     * The list of session properties that are used to identify the user.
     * This is computed during the data setup and when properties list change.
     */
    accessor sessionProperties: (DomainProperty | MissingDomainProperty)[];
    /**
     * The list of user object properties.
     */
    accessor userObjectProperties: DomainProperty[];
    protected handleModelChange(model: ApiModel | undefined): void;
    findDefaultSessionProperties(user?: DomainEntity): string[];
    updateUserObjectProperties(): void;
    /**
     * Updates the session properties based on the current model.
     * This is called when the user object changes or when the model is updated.
     */
    updateSessionProperties(): void;
    protected handleUserObjectChange(): void;
    ensureSession(model: ApiModel): SessionConfiguration;
    ensureCookieConfiguration(session: SessionConfiguration): CookieConfiguration;
    ensureJwtConfiguration(session: SessionConfiguration): JwtConfiguration;
    protected handleUserSelectionChange(e: CustomEvent<UiSelectChangeEvent>): void;
    protected handleSessionPropertyMenuSelect(e: CustomEvent<{
        item: UiMenuItemElement;
    }>): void;
    addSessionProperty(propertyKey: string): void;
    removeSessionProperty(propertyKey: string): void;
    protected handleSessionSecretChange(e: Event): void;
    protected handleGenerateSecret(): void;
    protected handleCookieToggle(e: Event): void;
    protected handleJwtToggle(e: Event): void;
    protected handleCookieLifetimeChange(e: Event): void;
    protected handleCookieNameChange(e: Event): void;
    protected handleCookieHttpOnlyChange(e: Event): void;
    protected handleCookieSecureChange(e: Event): void;
    protected handleCookieSameSiteChange(e: Event): void;
    protected handleJwtLifetimeChange(e: Event): void;
    render(): TemplateResult | typeof nothing;
    protected renderUserObjectSection(model: ApiModel): TemplateResult;
    protected renderSessionPropertiesSection(): TemplateResult;
    protected renderSessionPropertiesList(): TemplateResult | typeof nothing;
    protected renderProperty(item: DomainProperty | MissingDomainProperty): TemplateResult;
    isMissingProperty(item: DomainProperty | MissingDomainProperty): item is MissingDomainProperty;
    protected renderSessionSecuritySection(): TemplateResult;
    protected renderSessionTransportSection(): TemplateResult;
    protected renderCookieSection(): TemplateResult;
    protected renderCookieSettings(enabled: boolean): TemplateResult | typeof nothing;
    protected renderJwtSection(): TemplateResult;
    protected renderJwtSettings(enabled: boolean): TemplateResult | typeof nothing;
}
export {};
//# sourceMappingURL=ApiModelingSessionScreen.d.ts.map