conversations-classic-ios/ConversationsClassic/View/Screens/Attachments/AttachmentPickerScreen.swift
2024-07-02 12:23:27 +02:00

40 lines
951 B
Swift

import SwiftUI
struct AttachmentPickerScreen: View {
@EnvironmentObject var store: AppStore
@State private var selectedTab: AttachmentTab = .media
var body: some View {
ZStack {
// Background color
Color.Main.backgroundLight
.ignoresSafeArea()
// Content
VStack(spacing: 0) {
// Header
AttachmentHeader()
// Pickers
switch selectedTab {
case .media:
AttachmentMediaPickerView()
case .files:
AttachmentFilesPickerView()
case .location:
AttachmentLocationPickerView()
case .contacts:
AttachmentContactsPickerView()
}
// Tab bar
AttachmentTabBar(selectedTab: $selectedTab)
}
}
}
}