2024-07-02 09:56:27 +00:00
|
|
|
import SwiftUI
|
|
|
|
|
|
|
|
struct AttachmentPickerScreen: View {
|
|
|
|
@EnvironmentObject var store: AppStore
|
|
|
|
|
|
|
|
@State private var selectedTab: AttachmentTab = .media
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
ZStack {
|
|
|
|
// Background color
|
2024-07-04 08:21:12 +00:00
|
|
|
Color.Material.Background.light
|
2024-07-02 09:56:27 +00:00
|
|
|
.ignoresSafeArea()
|
|
|
|
|
|
|
|
// Content
|
|
|
|
VStack(spacing: 0) {
|
|
|
|
// Header
|
|
|
|
AttachmentHeader()
|
|
|
|
|
|
|
|
// Pickers
|
2024-07-02 10:23:27 +00:00
|
|
|
switch selectedTab {
|
|
|
|
case .media:
|
|
|
|
AttachmentMediaPickerView()
|
|
|
|
|
|
|
|
case .files:
|
|
|
|
AttachmentFilesPickerView()
|
|
|
|
|
|
|
|
case .location:
|
|
|
|
AttachmentLocationPickerView()
|
|
|
|
|
|
|
|
case .contacts:
|
|
|
|
AttachmentContactsPickerView()
|
|
|
|
}
|
2024-07-02 09:56:27 +00:00
|
|
|
|
|
|
|
// Tab bar
|
|
|
|
AttachmentTabBar(selectedTab: $selectedTab)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|