declare const LOCAL_SCRIPT_RULES_JS_FILENAME = "local_script_rules.js";
declare const LOCAL_SCRIPT_RULES_JSON_FILENAME = "local_script_rules.json";
type AssetsLoaderOptions = {
    /**
     * Whether to download latest text filters instead of DNR rulesets.
     */
    latestFilters?: boolean;
    /**
     * Whether to copy only the `declarative/` rulesets directory, skipping all
     * other files (`filters_i18n.json`, `local_script_rules.js`, etc.).
     * Useful for Chrome Web Store extensions that rely on the
     * [skip review](https://developer.chrome.com/docs/webstore/skip-review)
     * mechanism, which requires that only `rule_resources` files are changed.
     */
    onlyDeclarativeRulesets?: boolean;
};
/**
 * Api for loading assets.
 */
declare class AssetsLoader {
    /**
     * Download rulesets or filters to {@link dest} path. If {@link options.latestFilters}
     * is set to `true`, it will only download raw filters from the server,
     * otherwise it will copy rulesets from the local directory.
     *
     * @param dest Path to download assets.
     * @param options Options for loading assets.
     *
     * @returns Promise that resolves when assets are downloaded.
     */
    load(dest: string, options?: AssetsLoaderOptions): Promise<void>;
    /**
     * Copy only the local script rules JS file to the destination path.
     *
     * @param dest Path to copy the local script rules JS file to.
     *
     * @returns Promise that resolves when the file is copied.
     */
    copyLocalScriptRulesJs(dest: string): Promise<void>;
    /**
     * Copy only the local script rules JSON file to the destination path.
     *
     * @param dest Path to copy the local script rules JSON file to.
     *
     * @returns Promise that resolves when the file is copied.
     */
    copyLocalScriptRulesJson(dest: string): Promise<void>;
    /**
     * Extends the local script rules file with custom rules.
     * Parses the custom rules, extracts JS rules from them, and appends them
     * to the existing local_script_rules.js file.
     *
     * Uses a placeholder-based approach to insert new rules without AST deserialization,
     * which is much faster than previous approaches.
     *
     * @param localScriptRulesPath Path to the local_script_rules.js file to extend.
     * @param customRules Array of custom rule strings to add.
     *
     * @returns Promise that resolves when the file is updated.
     */
    extendLocalScriptRulesJs(localScriptRulesPath: string, customRules: string[]): Promise<void>;
    /**
     * Extends the local script rules JSON file with custom rules.
     * Parses the custom rules, extracts JS rules with domain configurations,
     * and merges them into the existing local_script_rules.json file.
     *
     * @param localScriptRulesJsonPath Path to the local_script_rules.json file to extend.
     * @param customRules Array of custom rule strings to add.
     *
     * @returns Promise that resolves when the file is updated.
     */
    extendLocalScriptRulesJson(localScriptRulesJsonPath: string, customRules: string[]): Promise<void>;
}

export { AssetsLoader, LOCAL_SCRIPT_RULES_JSON_FILENAME, LOCAL_SCRIPT_RULES_JS_FILENAME };
export type { AssetsLoaderOptions };
