use axum::extract::Query;
use axum::Json;
use serde::Deserialize;
use serde_json::{json, Value};

#[derive(Deserialize)]
pub struct SummaryRequest {
    url: String,
}

pub async fn generate_summary(
    Query(SummaryRequest { url: _url }): Query<SummaryRequest>,
) -> Json<Value> {
    // TODO: Stub, implement at least OpenGraph cards
    // Will need a HTTP client and a HTML parser at least
    // Would be nice to provide YouTube/... embeds

    Json(json!({}))
}
