import 'package:freezed_annotation/freezed_annotation.dart';

part 'landmark_type.freezed.dart';
part 'landmark_type.g.dart';

@freezed
abstract class LandmarkType with _$LandmarkType {
  const factory LandmarkType({
    required LandmarkTypeEnum type,
  }) = _LandmarkType;

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

@JsonEnum(alwaysCreate: true)
enum LandmarkTypeEnum {
  @JsonValue('sightseeing')
  sightseeing,
  @JsonValue('nature')
  nature,
  @JsonValue('shopping')
  shopping,
  @JsonValue('start')
  start,
  @JsonValue('finish')
  finish,
}

extension LandmarkTypeEnumExtension on LandmarkTypeEnum {
  String get value => _$LandmarkTypeEnumEnumMap[this]!;
}
