metatext-app-ios-iphone-ipad/ViewModels/Sources/ViewModels/View Models/AttachmentsRenderingViewMod...

24 lines
838 B
Swift
Raw Normal View History

2021-01-08 07:11:33 +01:00
// Copyright © 2020 Metabolist. All rights reserved.
import Foundation
public protocol AttachmentsRenderingViewModel {
var attachmentViewModels: [AttachmentViewModel] { get }
var shouldShowAttachments: Bool { get }
var shouldShowHideAttachmentsButton: Bool { get }
var sensitive: Bool { get }
var canRemoveAttachments: Bool { get }
func attachmentSelected(viewModel: AttachmentViewModel)
func removeAttachment(viewModel: AttachmentViewModel)
func toggleShowAttachments()
}
public extension AttachmentsRenderingViewModel {
var shouldShowAttachments: Bool { true }
var shouldShowHideAttachmentsButton: Bool { false }
var sensitive: Bool { false }
var canRemoveAttachments: Bool { false }
func removeAttachment(viewModel: AttachmentViewModel) {}
func toggleShowAttachments() {}
}