blob: dcaa16d57535637825680263dd11bd28cb579ca6 (
plain) (
tree)
|
|
//
// ForayViewModels.swift
// foray
//
// Created by Nicholas Tay on 24/3/2022.
//
import Foundation
import UIKit
struct PenguinItemViewModel {
let type: PenguinItemType
let releaseDateFormatted: String
let year: Int
let id: String
let name: String
var typeName: String {
switch type {
case .item:
return "Item"
case .quest:
return "Quest"
}
}
var icon: UIImage {
switch type {
case .item:
return UIImage(named: id) ?? UIImage.fromAsset(.spy)
case .quest:
return UIImage.fromAsset(.spy)
}
}
}
|