import { Response } from 'got';
import scrapeIt from "scrape-it";
import * as helper from './utils/helper.js';
import { CookieJar } from 'tough-cookie';
import { UrlResolverOptions } from './UrlResolverOptions.js';
import { UrlResolver } from './UrlResolver.js';
export declare abstract class BaseUrlResolver {
    protected domains: RegExp[];
    protected gotInstance: import("got").Got<import("got").ExtendOptions>;
    protected _speedRank: number;
    protected useCookies: boolean;
    protected scrapeItAsync: typeof scrapeIt;
    protected scrapeHtml: typeof scrapeIt.scrapeHTML;
    protected _cookieJar?: CookieJar;
    protected defaultUserAgent: string;
    protected _resolverOptions?: Partial<UrlResolverOptions>;
    protected _context?: UrlResolver;
    protected getSecondLevelDomain: (someUrl: string) => string | null;
    protected isValidHttpUrl: (someUrl: string) => boolean;
    protected getHiddenForm: (html: string, ix?: number) => Record<string, string> | undefined;
    protected scrapeLinkHref: (html: string, selector: string) => string;
    protected scrapePageTitle: (html: string) => string;
    protected scrapeInnerText: (html: string, selector: string) => string;
    protected parseAllLinks: (html: string, context: string, baseUrl?: string) => helper.ScrapedAnchorElement[];
    protected parseElementAttributes: (html: string, context: string, attribute: string) => string[];
    protected extractFileNameFromUrl: (someUrl: string) => string;
    protected wait: (ms: number) => Promise<unknown>;
    protected nodeatob: (str: string) => string;
    protected nodebtoa: (str: string) => string;
    protected getServerPublicIp: () => Promise<string>;
    protected parseScripts: (html: string, context?: string) => string[];
    protected scrapeAllLinks(html: string, context: string, baseUrl?: string): ResolvedMediaItem[];
    constructor(options: BaseResolverOptions);
    /**
     * @param {string} urlToResolve
     * Override this method if you want to implement can resolve function
     */
    canResolve(urlToResolve: string): Promise<boolean>;
    /**
     *
     * @param {string} urlToResolve
     */
    resolve(urlToResolve: string, options: Partial<UrlResolverOptions>, context?: UrlResolver): Promise<ResolvedMediaItem[]>;
    private massageResolveResults;
    private fillMetaInfoInner;
    fillMetaInfo(resolveMediaItem: ResolvedMediaItem): Promise<void>;
    private setupEnvironment;
    abstract resolveInner(_urlToResolve: string): Promise<ResolvedMediaItem[] | ResolvedMediaItem>;
    protected postHiddenForm(urlToPost: string, page: string, ix?: number, resolveBody?: true, followRedirect?: boolean): Promise<string>;
    protected postHiddenForm(urlToPost: string, page: string, ix?: number, resolveBody?: false, followRedirect?: boolean): Promise<Response<string>>;
}
export interface ResolvedMediaItem {
    title: string;
    poster: string;
    isPlayable: boolean;
    link: string;
    parent: string;
    headers: Record<string, string>;
    size?: string;
    lastModified?: string;
    contentType?: string;
    speedRank: number;
}
export interface BaseResolverOptions {
    domains: RegExp[];
    useCookies?: boolean;
    speedRank?: number;
}
export declare class GenericFormBasedResolver extends BaseUrlResolver {
    private _selector;
    private _formIx;
    constructor(options: BaseResolverOptions, selector: string, formIx?: number);
    resolveInner(_urlToResolve: string): Promise<ResolvedMediaItem[]>;
}
