import { EventEmitter, OnInit } from '@angular/core';
import { MJAPIScopeEntity } from '@memberjunction/core-entities';
import { BaseAngularComponent } from '@memberjunction/ng-base-types';
import * as i0 from "@angular/core";
/** Scope selection item */
interface ScopeItem {
    scope: MJAPIScopeEntity;
    selected: boolean;
}
/** Grouped scopes by category */
interface ScopeCategory {
    name: string;
    icon: string;
    color: string;
    scopes: ScopeItem[];
    expanded: boolean;
    allSelected: boolean;
}
/** Result of key creation */
export interface APIKeyCreateResult {
    success: boolean;
    apiKeyId?: string;
    rawKey?: string;
    error?: string;
}
/**
 * Dialog for creating new API keys
 * Shows the raw key only once - it cannot be recovered after closing
 */
export declare class APIKeyCreateDialogComponent extends BaseAngularComponent implements OnInit {
    Visible: boolean;
    VisibleChange: EventEmitter<boolean>;
    Created: EventEmitter<APIKeyCreateResult>;
    Closed: EventEmitter<void>;
    Label: string;
    Description: string;
    ExpiresAt: Date | null;
    NeverExpires: boolean;
    ExpirationPresets: {
        label: string;
        days: number;
    }[];
    SelectedPreset: {
        label: string;
        days: number;
    } | null;
    ScopeCategories: ScopeCategory[];
    IsLoadingScopes: boolean;
    IsCreating: boolean;
    Step: 'configure' | 'scopes' | 'success';
    RawApiKey: string;
    KeyCopied: boolean;
    Error: string;
    private readonly defaultUIConfig;
    ngOnInit(): void;
    /**
     * Handle escape key to close dialog
     */
    onEscapeKey(): void;
    /**
     * Load available scopes from cached data.
     * Uses UIConfig from root scopes for category icons/colors.
     */
    private loadScopes;
    /**
     * Handle expiration preset selection
     */
    onPresetSelect(preset: {
        label: string;
        days: number;
    }): void;
    /**
     * Handle never expires toggle
     */
    onNeverExpiresChange(): void;
    /**
     * Toggle category expansion
     */
    toggleCategory(category: ScopeCategory): void;
    /**
     * Toggle all scopes in a category
     */
    toggleCategoryAll(category: ScopeCategory): void;
    /**
     * Update category allSelected state
     */
    updateCategoryState(category: ScopeCategory): void;
    /**
     * Get selected scope count
     */
    getSelectedScopeCount(): number;
    /**
     * Proceed to scopes step
     */
    goToScopes(): void;
    /**
     * Go back to configure step
     */
    goBack(): void;
    /**
     * Create the API key using server-side cryptographic hashing
     */
    createKey(): Promise<void>;
    /**
     * Copy the API key to clipboard
     */
    copyKey(): Promise<void>;
    /**
     * Close the dialog
     */
    close(): void;
    /**
     * Reset form state
     */
    private reset;
    /**
     * Get minimum date for expiration (tomorrow)
     */
    getMinDate(): Date;
    static ɵfac: i0.ɵɵFactoryDeclaration<APIKeyCreateDialogComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<APIKeyCreateDialogComponent, "mj-api-key-create-dialog", never, { "Visible": { "alias": "Visible"; "required": false; }; }, { "VisibleChange": "VisibleChange"; "Created": "Created"; "Closed": "Closed"; }, never, never, false, never>;
}
export {};
//# sourceMappingURL=api-key-create-dialog.component.d.ts.map