import { copy } from 'fs-extra';
import path from 'node:path';
import process from 'node:process';
import { fileURLToPath } from 'node:url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
/**
 * Api for loading assets.
 */ class AssetsLoader {
    /**
     * Download filters to {@link dest} path.
     *
     * @param dest Path to download filters.
     * @returns Promise that resolves when filters are downloaded.
     */ async load(dest) {
        const to = path.resolve(process.cwd(), dest);
        const src = path.resolve(__dirname, '../../filters');
        return copy(src, to);
    }
}

export { AssetsLoader };
