// // TrashModel.swift // TrashTrack // // Created by Oliver Hnát on 12.01.2024. // import Foundation import SwiftUI struct Trash { var type: String var color: Color var image: Image } struct TrashEvent: Identifiable { var id: Int var trash: Trash var date: Date } struct TrashModel { var trashTypes: [Trash] var trashEvents: [TrashEvent] init() { self.trashTypes = [ Trash(type: "plastic", color: Color.orange, image: Image(systemName: "waterbottle")), Trash(type: "paper", color: Color.orange, image: Image(systemName: "newspaper")), Trash(type: "bio", color: Color.orange, image: Image(systemName: "tree")), Trash(type: "residual", color: Color.orange, image: Image(systemName: "trash")) ] self.trashEvents = [] let numberOfEvents = 3 for i in 0.. [TrashEvent] { return self.trashEvents } }