blob: dcaa16d57535637825680263dd11bd28cb579ca6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
//
// 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)
}
}
}
|