// src/pages/routing/router.rs
use crate::state::pages::{
    auth::AuthState,
    add_logic::AddLogicState,
    add_table::AddTableState,
};
use crate::pages::admin::AdminState;
use crate::pages::forms::FormState;
use crate::pages::login::LoginFormState;
use crate::pages::register::RegisterFormState;
use crate::pages::intro::IntroState;

#[derive(Debug)]
pub enum Page {
    Intro(IntroState),
    Login(LoginFormState),
    Register(RegisterFormState),
    Admin(AdminState),
    AddLogic(AddLogicState),
    AddTable(AddTableState),
    Form(String),
}

pub struct Router {
    pub current: Page,
}

impl Router {
    pub fn new() -> Self {
        Self {
            current: Page::Intro(IntroState::default()),
        }
    }

    pub fn navigate(&mut self, page: Page) {
        self.current = page;
    }
}
