use non_blank_string_rs::NonBlankString;
use std::str::FromStr;

use crate::modules::helm::chart::HelmChartScore;

pub fn grafana_helm_chart_score(ns: &str) -> HelmChartScore {
    let values = format!(
        r#"
rbac:
  namespaced: true
sidecar:
  dashboards:
    enabled: true
        "#
    );

    HelmChartScore {
        namespace: Some(NonBlankString::from_str(ns).unwrap()),
        release_name: NonBlankString::from_str("grafana").unwrap(),
        chart_name: NonBlankString::from_str("oci://ghcr.io/grafana/helm-charts/grafana").unwrap(),
        chart_version: None,
        values_overrides: None,
        values_yaml: Some(values.to_string()),
        create_namespace: true,
        install_only: true,
        repository: None,
    }
}
