#pragma once

#include <cstdint>
#include <string>
#include <vector>

#include "presentation/pages/PageId.h"
#include "foundation/diagnostics/Logger.h"
#include "presentation/pages/items/ItemCatalogModel.h"
#include "presentation/pages/quests/QuestSelectionModel.h"

namespace ta::presentation
{
    struct ProgressionPageState
    {
        std::string skill_search;
    };

    struct DiagnosticsPageState
    {
        std::string filter;
        bool show_path = true;
        bool show_info = true;
        bool show_warnings = true;
        bool show_errors = true;
        bool show_thread = false;
        bool auto_scroll = true;
        bool paused = false;
        std::string save_status;
        std::vector<ta::foundation::logger::Entry> live_entries;
        std::vector<ta::foundation::logger::Entry> paused_entries;
        bool was_paused = false;

        double rate_sample_time = 0.0;
        std::uint64_t previous_application_hits = 0;
        std::uint64_t previous_gameworld_hits = 0;
        std::uint64_t previous_present_hits = 0;
        std::uint64_t previous_fixed_update_hits = 0;
        float application_hz = 0.0f;
        float gameworld_hz = 0.0f;
        float present_hz = 0.0f;
        float fixed_update_hz = 0.0f;
    };

    struct UiState
    {
        bool open = false;
        float animation = 0.0f;
        ta::presentation::pages::PageId selected_page = ta::presentation::pages::PageId::Visuals;
        std::uint64_t item_navigation_revision = 0;
        bool item_sidebar_active = false;

        ta::presentation::pages::items::ItemCatalogModel items;
        ta::presentation::pages::quests::QuestSelectionModel quests;
        ProgressionPageState progression;
        DiagnosticsPageState diagnostics;
    };
}
