import { CSSResult, nothing, TemplateResult } from 'lit';
import { type CertificateType } from '@api-client/core/models/ClientCertificate.js';
import ApiElement from '../ApiElement.js';
import type { ISegmentedButtonSelectionDetail } from '../../md/segmented-button/internals/SegmentedButtonsSet.js';
import '../../md/segmented-button/ui-segmented-button.js';
import '../../md/segmented-button/ui-segmented-button-set.js';
import '../../md/text-field/ui-filled-text-field.js';
import '../../md/button/ui-button.js';
import '../../md/icons/ui-icon.js';
import '../../md/progress/ui-progress.js';
interface CertificateInfo {
    fileName: string;
    contents: ArrayBuffer;
}
/**
 * An element that renders a certificate import UI.
 *
 * Notes for implementation:
 * - `p12` is a single file, may have a passphrase
 * - `pem` is 2 files: the certificate and the key
 * - `pem` may have a `passphrase` on the key but not on the certificate.
 */
export default class CertificateAdd extends ApiElement {
    static get styles(): CSSResult[];
    /**
     * The type of the certificate to import.
     * @attribute
     */
    accessor importType: CertificateType;
    /**
     * The parent folder where to insert the imported certificate.
     * @attribute
     */
    accessor folder: string | undefined;
    /**
     * The current workspace for the file.
     * @attribute
     */
    accessor space: string | undefined;
    /**
     * When an IO operation is in progress.
     */
    accessor working: boolean | undefined;
    accessor certificateFile: CertificateInfo | undefined;
    accessor keyFile: CertificateInfo | undefined;
    /**
     * The password for the certificate
     */
    certificatePassword?: string;
    /**
     * The password for the key.
     */
    keyPassword?: string;
    /**
     * The user entered certificate name.
     */
    protected certificateName?: string;
    get hasKeyImport(): boolean;
    get hasCertificatePasswordInput(): boolean;
    protected handleViewSelection(e: CustomEvent<ISegmentedButtonSelectionDetail>): void;
    protected handleNameChange(e: Event): void;
    protected handleCertificatePasswordChange(e: Event): void;
    protected handleKeyPasswordChange(e: Event): void;
    protected handleSelectCertificate(): void;
    protected handleSelectKey(): void;
    selectCertificateFLow(): Promise<void>;
    selectKeyFLow(): Promise<void>;
    protected isValidDropTarget(dt: DataTransfer): boolean;
    protected handleFileDragEnter(e: DragEvent): void;
    protected handleFileDragLeave(e: DragEvent): void;
    protected handleFileDragOver(e: DragEvent): void;
    protected handleFileDrop(e: DragEvent): void;
    processDroppedFile(file: File, kind: 'certificate' | 'key'): Promise<void>;
    protected handleCancel(): void;
    protected handleImport(): void;
    submit(): Promise<void>;
    reportValidity(): boolean;
    protected render(): TemplateResult;
    protected renderViewToggle(): TemplateResult;
    protected renderNameInput(): TemplateResult;
    protected renderCertificateFile(): TemplateResult;
    protected renderCertificatePasswordInput(): TemplateResult | typeof nothing;
    protected renderKeyFile(): TemplateResult | typeof nothing;
    protected renderKeyPasswordInput(): TemplateResult | typeof nothing;
    protected renderImportButton(): TemplateResult;
    protected renderProgress(): TemplateResult | typeof nothing;
}
export {};
//# sourceMappingURL=CertificateAdd.element.d.ts.map