# Setup Wizard Form for Provisioning System
# Interactive configuration for initial system setup
# Location: .typedialog/provisioning/setup-wizard.toml

description = "Interactive setup wizard for provisioning system initialization"
display_mode = "complete"
locales_path = ""
name = "Provisioning System Setup Wizard"

# ============================================================================
# SYSTEM CONFIGURATION
# ============================================================================

[[elements]]
border_bottom = true
border_top = true
name = "system_header"
title = "⚙️  System Configuration"
type = "section_header"

[[elements]]
help = "Base path for storing configuration files"
name = "config_path"
nickel_path = ["system_config", "config_path"]
placeholder = "/Users/username/.config/provisioning"
prompt = "Configuration base path"
required = true
type = "text"

[[elements]]
help = "Use recommended paths for your operating system"
name = "use_defaults"
nickel_path = ["system_config", "use_defaults"]
prompt = "Use recommended paths for your OS?"
required = false
type = "confirm"
default = true

# ============================================================================
# DEPLOYMENT MODE SELECTION
# ============================================================================

[[elements]]
border_bottom = true
border_top = true
name = "deployment_header"
title = "🚀 Deployment Mode"
type = "section_header"

[[elements]]
help = "Choose how platform services will be deployed"
name = "deployment_mode"
nickel_path = ["deployment_mode"]
prompt = "Deployment mode"
required = true
type = "select"
options = ["docker-compose", "kubernetes", "remote-ssh", "systemd"]
default = "docker-compose"

# ============================================================================
# PROVIDER SELECTION
# ============================================================================

[[elements]]
border_bottom = true
border_top = true
name = "providers_header"
title = "☁️  Infrastructure Providers"
type = "section_header"

[[elements]]
help = "Select which infrastructure providers to enable"
name = "providers_info"
title = "Select at least one provider"
type = "section_header"

[[elements]]
help = "Enable UpCloud provider"
name = "provider_upcloud"
nickel_path = ["providers", "upcloud"]
prompt = "Use UpCloud?"
required = false
type = "confirm"
default = false

[[elements]]
help = "Enable AWS provider"
name = "provider_aws"
nickel_path = ["providers", "aws"]
prompt = "Use AWS?"
required = false
type = "confirm"
default = false

[[elements]]
help = "Enable Hetzner provider"
name = "provider_hetzner"
nickel_path = ["providers", "hetzner"]
prompt = "Use Hetzner?"
required = false
type = "confirm"
default = false

[[elements]]
help = "Enable local provider (required for local deployments)"
name = "provider_local"
nickel_path = ["providers", "local"]
prompt = "Use local provider?"
required = false
type = "confirm"
default = true

# ============================================================================
# RESOURCE ALLOCATION
# ============================================================================

[[elements]]
border_bottom = true
border_top = true
name = "resources_header"
title = "💻 Resource Allocation"
type = "section_header"

[[elements]]
help = "Number of CPU cores to allocate"
name = "cpu_count"
nickel_path = ["resources", "cpu_count"]
prompt = "Number of CPUs to allocate"
required = true
type = "number"
min = 1
max = 128
default = 4

[[elements]]
help = "Amount of memory to allocate (in GB)"
name = "memory_gb"
nickel_path = ["resources", "memory_gb"]
prompt = "Memory in GB to allocate"
required = true
type = "number"
min = 1
max = 1024
default = 8

# ============================================================================
# SECURITY CONFIGURATION
# ============================================================================

[[elements]]
border_bottom = true
border_top = true
name = "security_header"
title = "🔒 Security Configuration"
type = "section_header"

[[elements]]
help = "Enable Multi-Factor Authentication for enhanced security"
name = "enable_mfa"
nickel_path = ["security", "enable_mfa"]
prompt = "Enable Multi-Factor Authentication (MFA)?"
required = false
type = "confirm"
default = true

[[elements]]
help = "Enable audit logging for all operations"
name = "enable_audit"
nickel_path = ["security", "enable_audit"]
prompt = "Enable audit logging for all operations?"
required = false
type = "confirm"
default = true

[[elements]]
help = "Require approval for destructive operations"
name = "require_approval"
nickel_path = ["security", "require_approval_for_destructive"]
prompt = "Require approval for destructive operations?"
required = false
type = "confirm"
default = true

# ============================================================================
# WORKSPACE CONFIGURATION
# ============================================================================

[[elements]]
border_bottom = true
border_top = true
name = "workspace_header"
title = "📁 Initial Workspace"
type = "section_header"

[[elements]]
help = "Create an initial workspace for your infrastructure"
name = "create_workspace"
nickel_path = ["workspace", "create_workspace"]
prompt = "Create workspace now?"
required = false
type = "confirm"
default = true

[[elements]]
help = "Name for the initial workspace"
name = "workspace_name"
nickel_path = ["workspace", "name"]
prompt = "Workspace name"
required = false
type = "text"
default = "default"
when = "create_workspace == true"

[[elements]]
help = "Optional description for the workspace"
name = "workspace_description"
nickel_path = ["workspace", "description"]
prompt = "Workspace description (optional)"
required = false
type = "text"
default = "Default workspace"
when = "create_workspace == true"
