use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct SmpMapTitleHintTitleHit {
    pub title: String,
    pub earliest_offset: usize,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct SmpMapTitleHintMapReference {
    pub offset: usize,
    pub text: String,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct SmpMapTitleHintAdjacentPair {
    pub map_reference_offset: usize,
    pub map_reference_text: String,
    pub title_offset: usize,
    pub title: String,
    pub byte_distance: usize,
    pub normalized_stem_match: bool,
}

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct SmpMapTitleHintProbe {
    pub source_kind: String,
    pub profile_family: Option<String>,
    pub grounded_title_hits: Vec<SmpMapTitleHintTitleHit>,
    pub embedded_map_references: Vec<SmpMapTitleHintMapReference>,
    pub adjacent_reference_title_pairs: Vec<SmpMapTitleHintAdjacentPair>,
    pub strongest_same_stem_pair: Option<SmpMapTitleHintAdjacentPair>,
}
