import { Plugin } from 'vite';

interface ZipPackageFile {
    /**
     * The resolved file or directory
     */
    src: string;
    /**
     * set a prefix for the file or directory
     */
    prefix?: string;
    /**
     * Files to be excluded
     */
    excludedFiles?: string[];
}
interface Options {
    /**
     * Input Directory
     * @default `dist`
     */
    inDir?: string;
    /**
     * A list of files or directories with preifx and exclusions.
     */
    files?: ZipPackageFile[];
    /**
     * Output Directory
     * @default `dist-zip`
     */
    outDir: string;
    /**
     * Zip Archive Name.
     * @default `${pkg.name}-${pkg.version}.zip`
     */
    zipName: string;
    /**
     * Files to be excluded
     */
    excludedFiles?: string[];
    /**
     * After creating the zip file execute
     */
    onArchived: () => void;
    /**
     * Execute when an error occurs
     * @param err Error message
     */
    onError: (err: Error) => void;
}
declare function fflateZip(options?: Partial<Options>): Plugin;

export { type Options, type ZipPackageFile, fflateZip as default };
