MainVM.swift 447 B

12345678910111213141516171819202122232425262728
  1. //
  2. // MainVM.swift
  3. // SUIExamples
  4. //
  5. // Created by Pavel Yurchenko on 27.11.2024.
  6. //
  7. import SwiftUI
  8. typealias Action = () -> Void
  9. typealias IntAction = (Int) -> Void
  10. @Observable
  11. final class MainVM {
  12. struct Output {
  13. var onProducts: Action?
  14. var onProduct: IntAction?
  15. var onCart: Action?
  16. var onFeedback: Action?
  17. }
  18. let output: Output
  19. init(output: Output) {
  20. self.output = output
  21. }
  22. }