import { LitElement, type TemplateResult } from 'lit';
import { CSVOptions, type ParseResult } from '@api-client/core/modeling/importers/CsvImporter.js';
import type { DataDomain } from '@api-client/core/modeling/DataDomain.js';
import type { TabSelectionDetail } from '../../md/tabs/ui-tabs.js';
import type { UiSelectChangeEvent } from '../../md/select/ui-select.js';
declare const Base: (new (...args: any[]) => import("../../mixins/FileDropMixin.js").FileDropMixinInterface) & typeof LitElement;
declare enum ImportType {
    unknown = 0,
    CSV = 1,
    JSON = 2
}
declare enum ProcessState {
    idle = 0,
    reading = 1,
    previewing = 2
}
interface FileImportData {
    file: File;
    type: ImportType;
    data?: ParseResult;
    processed?: boolean;
}
/**
 * A component that allows the user to import files that describe data schemas.
 * Supports CSV files (with preview) and JSON schema files.
 *
 * @fires openentity - Fired when an entity is selected.
 * @fires openmodel - Fired when a model is selected.
 */
export default class DomainFileImport extends Base {
    /**
     * The instance of the root DataNamespace.
     */
    accessor root: DataDomain | undefined;
    /**
     * The type of the files to be imported.
     */
    accessor importType: ImportType;
    /**
     * The state of the file import process.
     */
    accessor processState: ProcessState;
    /**
     * The files that are currently being processed.
     */
    accessor importFiles: FileImportData[];
    /**
     * The index of the currently selected file in the importFiles array.
     * This is used to keep track of which file preview is being rendered.
     */
    accessor selectedFileIndex: number;
    /**
     * The user options for the CSV parser.
     * This is used to configure the CSV parser.
     */
    protected cvsOptions: CSVOptions | undefined;
    constructor();
    /**
     * Reports an error to the element.
     * It will dispatch an 'error' event with the Exception object as the detail.
     * It unifies the error handling across the application.
     * @param error The error to report.
     */
    reportError(error: Error): void;
    handleFileChange(e: Event): void;
    handleTriggerFile(): void;
    processDroppedFiles(files: FileList): Promise<void>;
    /**
     * Detects the file type based on file extension and MIME type.
     */
    private detectFileType;
    /**
     * Handles multiple CSV files by parsing the first one for preview.
     */
    handleMultipleCsvFiles(): Promise<void>;
    /**
     * Handles multiple JSON schema files by processing them directly.
     */
    handleMultipleJsonFiles(): Promise<void>;
    /**
     * Processes a single CSV file data with the current settings.
     */
    processCsvFileData(fileData: FileImportData): Promise<void>;
    /**
     * Reprocesses all CSV files with current options.
     */
    reprocessCsvFiles(): Promise<void>;
    protected handleCsvOptionChange(e: CustomEvent<UiSelectChangeEvent>): void;
    protected handleCsvSave(): Promise<void>;
    protected handlePreviewTabChange(e: CustomEvent<TabSelectionDetail>): void;
    protected render(): TemplateResult;
    protected renderHeader(): TemplateResult;
    protected renderDropTarget(): TemplateResult;
    protected renderLoadingState(): TemplateResult;
    protected renderDataPreview(): TemplateResult;
    protected renderCsvPreview(): TemplateResult;
    protected renderPreviewOrTabs(): TemplateResult;
    protected renderCsvImportOptions(): TemplateResult;
}
export {};
//# sourceMappingURL=DomainFileImport.d.ts.map