38 lines
1.1 KiB
Swift
38 lines
1.1 KiB
Swift
|
|
import SwiftUI
|
||
|
|
|
||
|
|
struct AISummaryCard: View {
|
||
|
|
let count: Int
|
||
|
|
let bullets: [String]
|
||
|
|
|
||
|
|
var body: some View {
|
||
|
|
VStack(alignment: .leading, spacing: 12) {
|
||
|
|
HStack(spacing: 7) {
|
||
|
|
Image(systemName: "sparkles")
|
||
|
|
Text("SUMMARY")
|
||
|
|
Text(".")
|
||
|
|
Text("\(count) \(messageLabel.uppercased())")
|
||
|
|
}
|
||
|
|
.font(.caption.weight(.semibold))
|
||
|
|
.foregroundStyle(SIO.tint)
|
||
|
|
|
||
|
|
ForEach(Array(bullets.enumerated()), id: \.offset) { _, bullet in
|
||
|
|
HStack(alignment: .top, spacing: 8) {
|
||
|
|
Circle()
|
||
|
|
.fill(SIO.tint)
|
||
|
|
.frame(width: 6, height: 6)
|
||
|
|
.padding(.top, 6)
|
||
|
|
Text(bullet)
|
||
|
|
.font(.subheadline)
|
||
|
|
.fixedSize(horizontal: false, vertical: true)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
.padding(16)
|
||
|
|
.sioCardBackground(tint: SIO.tint)
|
||
|
|
}
|
||
|
|
|
||
|
|
private var messageLabel: String {
|
||
|
|
count == 1 ? "message" : "messages"
|
||
|
|
}
|
||
|
|
}
|