60 lines
1.9 KiB
Swift
60 lines
1.9 KiB
Swift
import SwiftUI
|
|
|
|
struct CreatorChannelTalkActionSection: View {
|
|
let isAiChatAvailable: Bool
|
|
let isDmAvailable: Bool
|
|
let onTapTalk: () -> Void
|
|
let onTapDm: () -> Void
|
|
|
|
var body: some View {
|
|
HStack(spacing: SodaSpacing.s8) {
|
|
Spacer()
|
|
|
|
if isAiChatAvailable {
|
|
Button(action: onTapTalk) {
|
|
HStack(spacing: SodaSpacing.s6) {
|
|
Image("ic_new_talk")
|
|
.resizable()
|
|
.frame(width: 20, height: 20)
|
|
|
|
Text(I18n.CreatorChannelHome.talk)
|
|
.appFont(size: 16, weight: .medium)
|
|
.foregroundColor(.white)
|
|
}
|
|
.padding(SodaSpacing.s12)
|
|
.overlay(
|
|
Capsule()
|
|
.stroke(Color.white.opacity(0.3), lineWidth: 1)
|
|
)
|
|
}
|
|
.buttonStyle(.plain)
|
|
}
|
|
|
|
if isDmAvailable {
|
|
Button(action: onTapDm) {
|
|
HStack(spacing: SodaSpacing.s6) {
|
|
Image("ic_new_talk")
|
|
.resizable()
|
|
.frame(width: 20, height: 20)
|
|
|
|
Text(I18n.CreatorChannelHome.dm)
|
|
.appFont(size: 16, weight: .medium)
|
|
.foregroundColor(.white)
|
|
}
|
|
.padding(SodaSpacing.s12)
|
|
.overlay(
|
|
Capsule()
|
|
.stroke(Color.white.opacity(0.3), lineWidth: 1)
|
|
)
|
|
}
|
|
.buttonStyle(.plain)
|
|
}
|
|
|
|
Spacer()
|
|
}
|
|
.frame(height: 44)
|
|
.frame(maxWidth: .infinity)
|
|
.padding(.bottom, 14)
|
|
}
|
|
}
|