shiny::devmode(TRUE)

library(shiny)
library(bslib)
theme <- bs_theme(
  primary = "#7faeff"  # blue-light
)

source("R/Global.R")
source("home_page.R")
source("explore_page.R")
source("optimize_page.R")


    
    
inspect_page <- tagList(
  tags$div(
    "Hello World – Page C")
)



# --- UI ---

ui <- page_navbar(
  title = tags$img(
    "Plateflow",
    src = "logo.svg",
    height = "35px",
    alt = "InnerAnalyticsLogo"
  ),
  header = tags$head(
    tags$link(rel = "stylesheet", href = "styles.css")
  ),
  theme = theme,

  nav_panel("Home", home_page),
  nav_panel("EXPLORE", explore_page),
  nav_panel("INSPECT", inspect_page),
  nav_panel("OPTIMIZE", optimize_page)
)

# --- Server ---

server <- function(input, output, session) {
  # input$page holds the currently active tab name if you ever need it
  # e.g. observeEvent(input$page, { cat("Switched to:", input$page, "\n") })
  output$sessioninfo <- renderPrint({ sessionInfo()})

  
}



shinyApp(ui = ui, server = server)