// // KMBatchCollectionViewModel.swift // PDF Master // // Created by lizhe on 2023/1/12. // import Cocoa enum KMBatchCollectionViewType: String { case unknow = "unknow" case convertPDF = "Convert" case OCR = "OCR" case compress = "Compress" case security = "Security" case watermark = "Watermark" case background = "Background" case headerAndFooter = "Header & Footer" case batesNumber = "Bates" case batchRemove = "Batch Remove" case imageToPDF = "imageToPDF" static func typeOfRawVale(value: String) -> KMBatchCollectionViewType { var type: KMBatchCollectionViewType switch value { case "Convert": type = .convertPDF case "OCR": type = .OCR case "Compress": type = .compress case "Security": type = .security case "Watermark": type = .watermark case "Background": type = .background case "Header & Footer": type = .headerAndFooter case "Bates": type = .batesNumber case "Batch Remove": type = .batchRemove case "imageToPDF": type = .imageToPDF default: type = .convertPDF } return type } } class KMBatchCollectionViewModel: NSObject { var imageString: String = "" var selectImageString: String = "" var title: String = "" var isSelect: Bool = false var type: KMBatchCollectionViewType = .convertPDF var isDisable: Bool = false }