"""Streamlit app for Entropice dashboard.

Pages:

- Overview: List of available result directories with some summary statistics.
- Training Data: Visualization of training data distributions.
- Training Results Analysis: Analysis of training results and model performance.
- Experiment Analysis: Compare multiple training runs within an experiment.
- AutoGluon Analysis: Analysis of AutoGluon training results with SHAP visualizations.
- Model State: Visualization of model state and features.
- Inference: Visualization of inference results.
"""

import streamlit as st

from entropice.dashboard.views.dataset_page import render_dataset_page
from entropice.dashboard.views.experiment_analysis_page import render_experiment_analysis_page
from entropice.dashboard.views.inference_page import render_inference_page
from entropice.dashboard.views.overview_page import render_overview_page
from entropice.dashboard.views.training_analysis_page import render_training_analysis_page


def main():
    """Run the dashboard."""
    st.set_page_config(page_title="Entropice Dashboard", layout="wide")

    # Setup Navigation
    overview_page = st.Page(render_overview_page, title="Overview", icon="🏡", default=True)
    data_page = st.Page(render_dataset_page, title="Dataset", icon="📊")
    training_analysis_page = st.Page(render_training_analysis_page, title="Training Results Analysis", icon="🦾")
    experiment_analysis_page = st.Page(render_experiment_analysis_page, title="Experiment Analysis", icon="🔬")
    inference_page = st.Page(render_inference_page, title="Inference", icon="🗺️")

    pg = st.navigation(
        {
            "Overview": [overview_page],
            "Data": [data_page],
            "Experiments": [training_analysis_page, experiment_analysis_page],
            "Inference": [inference_page],
        }
    )
    pg.run()


if __name__ == "__main__":
    main()
