// // ProductVM.swift // SUIExamples // // Created by Pavel Yurchenko on 27.11.2024. // import SwiftUI @Observable final class ProductVM { struct Input { let id: Int } struct Output { var onProducts: Action? var onCart: Action? } let output: Output var objectId: Int private let input: Input init(input: Input, output: Output) { self.input = input self.output = output self.objectId = input.id DispatchQueue.main.asyncAfter(deadline: .now() + 3) { self.objectId = input.id + 5 } } }