import SwiftUI
import FoundationModels

struct AttractionsTool: Tool {
   let name = "determineAttractionLocation"
   let description = "Finds the longitude and latitude of a location on a map"

   @Generable
   struct Arguments {
      @Guide(description: "The name of the city to find attractions for")
      var city: String
      @Guide(description: "The country the city belongs to")
      var country: String
   }
   @Generable
   struct Attraction {
      let name: String
      let latitude: Double
      let longitude: Double
   }
   func call(arguments: Arguments) async throws -> [Attraction] {
      var attractions: [Attraction] = []
      attractions.append(Attraction(name: "Hotel Hyatt", latitude: 13.404954, longitude: 53.520008))
      attractions.append(Attraction(name: "Hotel Bronson", latitude: 14.404954, longitude: 54.520008))
      attractions.append(Attraction(name: "Hotel Maui", latitude: 15.404954, longitude: 55.520008))
      
      return attractions
   }
}