import { type CSVOptions, type ParseResult as ParseResult_ } from '@pawel-up/csv';
import type { DataDomain } from '../DataDomain.js';
import type { DomainEntity } from '../DomainEntity.js';
import type { DomainModel } from '../DomainModel.js';
interface ParseResult extends ParseResult_ {
    /**
     * The file name of the CSV that was parsed.
     * If the CSV is provided as a string, it will be named `inline_csv_0`, `inline_csv_1`, etc.
     */
    file: string;
}
interface ImportResult {
    /**
     * The DomainEntity created from the CSV data.
     */
    entity: DomainEntity;
    /**
     * The DomainModel that contains the imported entity.
     */
    model: DomainModel;
}
interface ImportManyResult {
    /**
     * An array of DomainEntity instances created from the CSV data.
     */
    entities: DomainEntity[];
    /**
     * The DomainModel that contains all imported entities.
     */
    model: DomainModel;
}
export type { CSVOptions, ParseResult, ImportResult, ImportManyResult };
/**
 * Imports CSV data into a DataDomain.
 *
 * This class parses CSV files and translates the column definitions into DomainProperty instances
 * within a specified DomainModel and DomainEntity.
 */
export declare class CsvImporter {
    private parser;
    private domain;
    /**
     * Creates an instance of CsvImporter.
     * @param domain The DataDomain to which the imported data will be added.
     * @param options Optional CSV parsing options.
     */
    constructor(domain: DataDomain, options?: CSVOptions);
    /**
     * Parses a CSV file or string to extract its structure and data.
     * This is a wrapper around the underlying CSV parser.
     * @param csv The CSV content to parse, as a File object or a string.
     * @returns A promise that resolves with the parsed result.
     */
    parse(csv: File | string): Promise<ParseResult>;
    private removeExtension;
    /**
     * Imports the parsed CSV data structure into the domain as a new model and entity.
     * It creates a `DomainEntity` where each column from the CSV is represented as a `DomainProperty`.
     * The first row of data is used to provide an example value for each property.
     * @param data The result from the `parse` method, containing the CSV structure and values.
     * @param modelName The name to be used for the created `DomainModel` and `DomainEntity`.
     * @returns A promise that resolves when the import is complete.
     */
    import(data: ParseResult, modelName: string): Promise<ImportResult>;
    /**
     * Imports multiple parsed CSV data structures into the same data model.
     * Creates a single `DomainModel` with multiple `DomainEntity` instances, one for each CSV data structure.
     * Each entity represents the structure of its corresponding CSV file.
     * @param data Array of objects containing parsed CSV data and entity names.
     * @param modelName The name to be used for the created `DomainModel`.
     * @returns A promise that resolves with the created model and all entities.
     */
    importMany(data: ParseResult[], modelName: string): Promise<ImportManyResult>;
}
//# sourceMappingURL=CsvImporter.d.ts.map