import "package:fast_network_navigation/structs/landmark.dart";
import 'package:http/http.dart' as http;


Future<List<Landmark>> fetchLandmarks() async {
  // final response = await http
  //     .get(Uri.parse('https://nav.kluster.moll.re/v1/destination/1'));

  // if (response.statusCode == 200) {
    // If the server did return a 200 OK response,
    // then parse the JSON.
    List<Landmark> landmarks = [
      Landmark(name: "Landmark 1", location: [48.85, 2.35], type: LandmarkType(name: "Type 1")),
      Landmark(name: "Landmark 2", location: [48.86, 2.36], type: LandmarkType(name: "Type 2")),
      Landmark(name: "Landmark 3", location: [48.75, 2.3], type: LandmarkType(name: "Type 3")),
      Landmark(name: "Landmark 4", location: [48.9, 2.4], type: LandmarkType(name: "Type 4")),
      Landmark(name: "Landmark 5", location: [48.91, 2.45], type: LandmarkType(name: "Type 5")),
    ];
    // sleep 10 seconds
    await Future.delayed(Duration(seconds: 10));
    return landmarks;
  // } else {
  //   // If the server did not return a 200 OK response,
  //   // then throw an exception.
  //   throw Exception('Failed to load destination');
  // }
}