use std::{collections::BTreeSet, net::IpAddr, pin::Pin};
use futures::Future;
use reqwest::Url;
use serde_json::Value;
use super::core::{Result, Subdomain};
use crate::enums::content::Content;
pub type InnerExtractFunc = Box<dyn Fn(Value, &str) -> Result<BTreeSet<Subdomain>> + Sync + Send>;
pub type GetQueryUrlFunc = Box<dyn Fn(&str) -> String + Sync + Send>;
pub type GetNextUrlFunc = Box<dyn Fn(Url, Content) -> Option<Url> + Sync + Send>;
pub type AsyncIPResolveFunc =
Box<dyn Fn(String) -> Pin<Box<dyn Future<Output = Option<IpAddr>> + Send>> + Send + Sync>;
pub struct GenericIntegrationCoreFuncs {
pub url: GetQueryUrlFunc,
pub next: GetNextUrlFunc,
}