import 'package:anyway/domain/entities/landmark_type.dart';
import 'package:anyway/domain/entities/landmark_description.dart';

import 'package:freezed_annotation/freezed_annotation.dart';
part 'landmark.freezed.dart';
part 'landmark.g.dart';

@unfreezed
abstract class Landmark with _$Landmark {
  factory Landmark({
    required String uuid,
    required String name,
    required List<double> location,
    required LandmarkType type,

    @JsonKey(name: 'is_secondary')
    bool? isSecondary,

    /// Optional rich description object (may be null if API returns plain string)
    LandmarkDescription? description,

    @JsonKey(name: 'name_en')
    String? nameEn,

    @JsonKey(name: 'website_url')
    String? websiteUrl,

    @JsonKey(name: 'image_url')
    String? imageUrl,

    @JsonKey(name: 'attractiveness')
    int? attractiveness,

    @JsonKey(name: 'n_tags')
    int? tagCount,



    /// Duration at landmark in minutes
    @JsonKey(name: 'duration')
    int? durationMinutes,

    bool? visited,

    @JsonKey(name: 'time_to_reach_next')
    int? timeToReachNextMinutes,
  }) = _Landmark;

  factory Landmark.fromJson(Map<String, Object?> json) => _$LandmarkFromJson(json);
}
