import SwiftUI struct SettingsToggleRow: View { let icon: String let title: String var subtitle: String? @Binding var isOn: Bool var body: some View { HStack(spacing: 12) { Image(systemName: icon) .font(.system(size: 14, weight: .medium)) .foregroundStyle(AppTheme.accentPurple) .frame(width: 32, height: 32) .background( RoundedRectangle(cornerRadius: 8) .fill(AppTheme.accentPurple.opacity(0.12)) ) VStack(alignment: .leading, spacing: 2) { Text(title) .font(.system(size: 13, weight: .medium)) .foregroundStyle(AppTheme.textPrimary) if let subtitle { Text(subtitle) .font(.system(size: 10)) .foregroundStyle(AppTheme.textSecondary) } } Spacer() Toggle("", isOn: $isOn) .labelsHidden() .toggleStyle(.switch) } .padding(.horizontal, 12) .padding(.vertical, 10) .background(AppTheme.panelBackground) .clipShape(RoundedRectangle(cornerRadius: 8)) .overlay( RoundedRectangle(cornerRadius: 8) .stroke(AppTheme.cardBorder, lineWidth: 1) ) .frame(maxWidth: .infinity, alignment: .leading) } } struct SettingsLinkRow: View { let icon: String let title: String var subtitle: String? let action: () -> Void var body: some View { Button(action: action) { HStack(spacing: 12) { Image(systemName: icon) .font(.system(size: 14, weight: .medium)) .foregroundStyle(AppTheme.accentPurple) .frame(width: 32, height: 32) .background( RoundedRectangle(cornerRadius: 8) .fill(AppTheme.accentPurple.opacity(0.12)) ) VStack(alignment: .leading, spacing: 2) { Text(title) .font(.system(size: 13, weight: .medium)) .foregroundStyle(AppTheme.textPrimary) if let subtitle { Text(subtitle) .font(.system(size: 10)) .foregroundStyle(AppTheme.textSecondary) } } Spacer() Image(systemName: "arrow.up.right") .font(.system(size: 11, weight: .medium)) .foregroundStyle(AppTheme.textTertiary) } .padding(.horizontal, 12) .padding(.vertical, 10) .background(AppTheme.panelBackground) .clipShape(RoundedRectangle(cornerRadius: 8)) .overlay( RoundedRectangle(cornerRadius: 8) .stroke(AppTheme.cardBorder, lineWidth: 1) ) } .buttonStyle(AppPlainButtonStyle()) .hoverCard(cornerRadius: 8) .frame(maxWidth: .infinity, alignment: .leading) } }