# Environment Setup Fragment
# Loaded conditionally when .env file doesn't exist

description = "Environment variables configuration"
display_mode = "complete"
name = "environment_setup"

[[elements]]
border_bottom = true
border_top = true
name = "env_header"
title = "🔧 Environment Configuration"
type = "section_header"

[[elements]]
name = "env_mode"
options = [
  { value = "development", label = "Development" },
  { value = "staging", label = "Staging" },
  { value = "production", label = "Production" },
]
prompt = "Environment mode"
required = true
type = "select"

[[elements]]
default = "info"
name = "log_level"
options = [
  { value = "trace", label = "Trace (verbose)" },
  { value = "debug", label = "Debug" },
  { value = "info", label = "Info" },
  { value = "warn", label = "Warning" },
  { value = "error", label = "Error" },
]
prompt = "Log level"
type = "select"

[[elements]]
default = true
name = "debug_mode"
prompt = "Enable debug mode?"
type = "confirm"
when = "env_mode == development"

[[elements]]
help = "Your application API key"
name = "api_key"
prompt = "API Key"
required = true
type = "password"

[[elements]]
name = "database_url"
placeholder = "postgresql://localhost:5432/mydb"
prompt = "Database URL"
required = true
type = "text"

[[elements]]
name = "redis_url"
placeholder = "redis://localhost:6379"
prompt = "Redis URL"
type = "text"
when = "env_mode == production"

[[elements]]
help = "Leave empty to disable error tracking"
name = "sentry_dsn"
prompt = "Sentry DSN (error tracking)"
type = "text"
when = "env_mode == production"
