use chrono_tz::Tz;
use scraps_libs::model::{scrap::Scrap, tags::Tags};
use super::{backlinks_map::BacklinksMap, scope_counts::ScopeCounts, scrap_types::ScrapTypes};
pub struct SiteNav {
pub scrap_count: usize,
pub tags: Tags,
pub types: ScrapTypes,
pub scope_counts: ScopeCounts,
pub build_search_index: bool,
pub timezone: Tz,
pub has_readme: bool,
}
impl SiteNav {
pub fn new(
scraps: &[Scrap],
backlinks_map: &BacklinksMap,
build_search_index: bool,
timezone: Tz,
has_readme: bool,
) -> SiteNav {
SiteNav {
scrap_count: scraps.len(),
tags: Tags::new(scraps),
types: ScrapTypes::new(scraps),
scope_counts: ScopeCounts::new(scraps, backlinks_map),
build_search_index,
timezone,
has_readme,
}
}
}