import SwiftUI

struct BlocklistRow: View {
    let option: BlocklistOption
    let isSelected: Bool

    var body: some View {
        HStack(spacing: 16) {
            ZStack {
                RoundedRectangle(cornerRadius: 10)
                    .fill(isSelected ? Color.green.opacity(0.15) : Color.gray.opacity(0.1))
                    .frame(width: 44, height: 44)

                Image(systemName: option.icon)
                    .font(.title3)
                    .foregroundStyle(isSelected ? .green : .secondary)
            }

            VStack(alignment: .leading, spacing: 4) {
                Text(option.enabled ? option.id : String(format: NSLocalizedString("%@ (Coming Soon)", comment: ""), option.id))
                    .font(.body)
                    .fontWeight(isSelected ? .semibold : .regular)

                Text(option.description)
                    .font(.caption)
                    .foregroundStyle(.secondary)
                    .lineLimit(2)
            }

            Spacer()

            if isSelected {
                Image(systemName: "checkmark.circle.fill")
                    .foregroundStyle(.green)
                    .font(.title3)
                    .transition(.scale.combined(with: .opacity))
            }
        }
        .padding(.vertical, 8)
    }
}
