import SwiftUI
import Bedrock

struct OptionRow: View {
    let icon: String
    let title: String
    var isDestructive: Bool = false
    let action: () -> Void

    var body: some View {
        Button(action: action) {
            HStack(spacing: Design.Spacing.medium) {
                Image(systemName: icon)
                    .typography(.body)
                    .foregroundStyle(isDestructive ? Color.red : Color.Text.secondary)
                    .frame(width: Design.CardSize.socialIconSize)

                Text(title)
                    .typography(.body)
                    .foregroundStyle(isDestructive ? Color.red : Color.Text.primary)

                Spacer()
            }
            .padding(.horizontal, Design.Spacing.large)
            .padding(.vertical, Design.Spacing.medium)
            .contentShape(.rect)
        }
        .buttonStyle(.plain)
    }
}
