33 lines
629 B
Swift
33 lines
629 B
Swift
import Foundation
|
|
|
|
enum SharingCameraMediaType: Stateable {
|
|
case video
|
|
case photo
|
|
}
|
|
|
|
struct SharingGalleryItem: Stateable, Identifiable {
|
|
var id: String
|
|
var type: SharingCameraMediaType
|
|
var thumbnail: Data?
|
|
var duration: String?
|
|
}
|
|
|
|
struct SharingState: Stateable {
|
|
var sharingShown: Bool
|
|
var isCameraAccessGranted: Bool
|
|
var isGalleryAccessGranted: Bool
|
|
|
|
var galleryItems: [SharingGalleryItem]
|
|
}
|
|
|
|
// MARK: Init
|
|
extension SharingState {
|
|
init() {
|
|
sharingShown = false
|
|
isCameraAccessGranted = false
|
|
isGalleryAccessGranted = false
|
|
|
|
galleryItems = []
|
|
}
|
|
}
|