description = "Demonstrates grouping related display items together"
name = "Form with Grouped Display Items"

# Main header (no group - always shown)
[[elements]]
align = "center"
border_bottom = true
border_top = true
name = "main_header"
title = "✨ Grouped Items Example"
type = "header"

# Account selection
[[elements]]
name = "account_type"
options = [
  { value = "Personal", label = "Personal - Individual Users" },
  { value = "Premium", label = "Premium - Growing Teams" },
  { value = "Enterprise", label = "Enterprise - Large Organizations" },
]
prompt = "Select account type"
required = true
type = "select"

# PREMIUM GROUP - All these items are grouped together
[[elements]]
border_top = true
group = "premium"
name = "premium_header"
title = "🌟 Premium Features"
type = "section"
when = "account_type == Premium"

[[elements]]
content = "✓ Unlimited storage\n✓ Advanced analytics\n✓ Priority support\n✓ Custom branding"
group = "premium"
name = "premium_features"
type = "section"
when = "account_type == Premium"

[[elements]]
border_bottom = true
content = "Pricing: $29/month"
group = "premium"
name = "premium_price"
type = "section"
when = "account_type == Premium"

[[elements]]
name = "premium_payment"
options = [
  { value = "Credit Card", label = "💳 Credit Card" },
  { value = "Bank Transfer", label = "🏦 Bank Transfer" },
  { value = "PayPal", label = "🅿️ PayPal" },
]
prompt = "Payment method"
required = true
type = "select"
when = "account_type == Premium"

# ENTERPRISE GROUP - All these items grouped together
[[elements]]
border_top = true
group = "enterprise"
name = "enterprise_header"
title = "🏛️ Enterprise Solution"
type = "section"
when = "account_type == Enterprise"

[[elements]]
content = "✓ Unlimited everything\n✓ Dedicated support\n✓ Custom integration\n✓ SLA guarantee\n✓ On-premise option"
group = "enterprise"
name = "enterprise_features"
type = "section"
when = "account_type == Enterprise"

[[elements]]
content = "⚠️ Requires enterprise agreement"
group = "enterprise"
name = "enterprise_note"
type = "section"
when = "account_type == Enterprise"

[[elements]]
border_bottom = true
content = "Contact our sales team for pricing"
group = "enterprise"
name = "enterprise_contact_info"
type = "section"
when = "account_type == Enterprise"

[[elements]]
name = "enterprise_contact_email"
prompt = "Your email"
required = true
type = "text"
when = "account_type == Enterprise"

# SUPPORT GROUP - Organized support options
[[elements]]
border_top = true
group = "support"
name = "support_section_header"
title = "📞 Support Options"
type = "section"

[[elements]]
content = "Choose your preferred support level"
group = "support"
name = "support_info"
type = "section"

[[elements]]
group = "support"
name = "support_level"
options = [
  { value = "Basic", label = "Basic - Email only" },
  { value = "Standard", label = "Standard - Email & chat" },
  { value = "Premium", label = "Premium - Phone & live support" },
]
prompt = "Support Level"
required = true
type = "select"

[[elements]]
border_bottom = true
content = "Support is available 24/7"
group = "support"
name = "support_footer"
type = "section"

# FINAL GROUP - Completion items
[[elements]]
border_top = true
group = "final"
name = "final_header"
title = "✅ Complete Registration"
type = "section"

[[elements]]
group = "final"
name = "agree_terms"
prompt = "I agree to the terms and conditions"
required = true
type = "confirm"

[[elements]]
align = "center"
border_bottom = true
border_top = true
content = "Click submit to complete your registration"
group = "final"
name = "final_cta"
title = "Ready?"
type = "cta"
