31 lines
1.4 KiB
Swift
31 lines
1.4 KiB
Swift
//
|
|
// HomeViewModel.swift
|
|
// FitnessApp
|
|
//
|
|
// Created by Matt Bruce on 12/20/24.
|
|
//
|
|
import SwiftUI
|
|
|
|
@Observable
|
|
class HomeViewModel {
|
|
var activities: [Activity] = []
|
|
var workouts: [Workout] = []
|
|
var calories: Int = 123
|
|
var active: Int = 205
|
|
var stand: Int = 80
|
|
|
|
var mockActivities = [
|
|
Activity(id: 0, title: "Today Steps", subtitle: "10,000 steps", image: "figure.walk", tintColor: .green, amount: "9,812"),
|
|
Activity(id: 1, title: "Today Steps", subtitle: "1,000 steps", image: "figure.walk", tintColor: .blue, amount: "812"),
|
|
Activity(id: 2, title: "Today Steps", subtitle: "12,000 steps", image: "figure.walk", tintColor: .purple, amount: "9,0000"),
|
|
Activity(id: 3, title: "Today Steps", subtitle: "50,000 steps", image: "figure.run", tintColor: .red, amount: "104,812")
|
|
]
|
|
|
|
var mockWorkouts = [
|
|
Workout(id: 0, title: "Running", image: "figure.run", tintColor: .green, duration: "1 hrs", date: "Aug 3", calories: "100 kcal"),
|
|
Workout(id: 1, title: "Strength Training", image: "figure.run", tintColor: .purple, duration: "1.5 hrs", date: "Aug 3", calories: "130 kcal"),
|
|
Workout(id: 2, title: "Walking", image: "figure.run", tintColor: .blue, duration: ".5 hrs", date: "Aug 3", calories: "250 kcal"),
|
|
Workout(id: 3, title: "Bike", image: "figure.run", tintColor: .red, duration: "2 hrs", date: "Aug 29", calories: "500 kcal")
|
|
]
|
|
}
|