struct ShowMovie: AppIntent {
   static let title: LocalizedStringResource = "Show Movie"
   static let description = IntentDescription("Shows movies you love or hate.")

   static let supportedModes: IntentModes = .background

   @Parameter(title: "Movie Type", requestValueDialog: IntentDialog("What type of movie?"))
   var movieType: MovieTypes

   @MainActor
   func perform() async throws -> some IntentResult & ProvidesDialog {
      var movie = "Undefined"
      if movieType == .love {
         movie = "Rambo"
      } else if movieType == .hate {
         movie = "Pulp Fiction"
      }
      return .result(
         dialog: IntentDialog("The movie is \(movie)")
      )
   }
}