import 'package:comwell_key_app/hotel_information/models/call_to_action.dart';
import 'package:comwell_key_app/hotel_information/models/structured_text.dart';
import 'package:comwell_key_app/utils/json.dart';
import 'package:json_annotation/json_annotation.dart';

part '../../.generated/hotel_information/models/facilities.g.dart';

@JsonSerializable()
class Facility {
  final String title;
  final String? headerImage;
  final List<StructuredTextBlock> structuredText;
  final CallToAction? callToAction;
  final String icon;

  Facility({
    required this.title,
    this.headerImage,
    required this.structuredText,
    this.callToAction,
    required this.icon,
  });

  factory Facility.fromJson(Json json) => _$FacilityFromJson(json);
  Json toJson() => _$FacilityToJson(this);
}