/// totalRecord : 0
/// isSuccess : true
/// errorMesssage : null
/// Data : {"Facebook":"facebook.com","Zalo":"zalo.com","Youtube":"23141","Messenger":"me.com","Gmail":"414141","SearchKeyword":null,"PhoneNumber":"012345678","Sliders":[{"Src":"/uploads/images/BANER/637682001896521981-1.jpg","Action":"#","Mobile_Url":"#"}]}
/// message : null

class HomeConfigResponse {
  HomeConfigResponse({
    int? totalRecord,
    bool? isSuccess,
    dynamic errorMesssage,
    HomeConfigData? data,
    dynamic message,
  }) {
    _totalRecord = totalRecord;
    _isSuccess = isSuccess;
    _errorMesssage = errorMesssage;
    _data = data;
    _message = message;
  }

  HomeConfigResponse.fromJson(dynamic json) {
    _totalRecord = json['totalRecord'];
    _isSuccess = json['isSuccess'];
    _errorMesssage = json['errorMesssage'];
    _data = json['Data'] != null ? HomeConfigData.fromJson(json['Data']) : null;
    _message = json['message'];
  }
  int? _totalRecord;
  bool? _isSuccess;
  dynamic _errorMesssage;
  HomeConfigData? _data;
  dynamic _message;

  int? get totalRecord => _totalRecord;
  bool? get isSuccess => _isSuccess;
  dynamic get errorMesssage => _errorMesssage;
  HomeConfigData? get data => _data;
  dynamic get message => _message;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['totalRecord'] = _totalRecord;
    map['isSuccess'] = _isSuccess;
    map['errorMesssage'] = _errorMesssage;
    if (_data != null) {
      map['Data'] = _data?.toJson();
    }
    map['message'] = _message;
    return map;
  }
}

/// Facebook : "facebook.com"
/// Zalo : "zalo.com"
/// Youtube : "23141"
/// Messenger : "me.com"
/// Gmail : "414141"
/// SearchKeyword : null
/// PhoneNumber : "012345678"
/// Sliders : [{"Src":"/uploads/images/BANER/637682001896521981-1.jpg","Action":"#","Mobile_Url":"#"}]

class HomeConfigData {
  HomeConfigData({
    String? facebook,
    String? zalo,
    String? youtube,
    String? messenger,
    String? gmail,
    String? searchKeyword,
    String? phoneNumber,
    List<SliderData>? sliders,
  }) {
    _facebook = facebook;
    _zalo = zalo;
    _youtube = youtube;
    _messenger = messenger;
    _gmail = gmail;
    _searchKeyword = searchKeyword;
    _phoneNumber = phoneNumber;
    _sliders = sliders;
  }

  HomeConfigData.fromJson(dynamic json) {
    _facebook = json['Facebook'];
    _zalo = json['Zalo'];
    _youtube = json['Youtube'];
    _messenger = json['Messenger'];
    _gmail = json['Gmail'];
    _searchKeyword = json['SearchKeyword'];
    _phoneNumber = json['PhoneNumber'];
    if (json['Sliders'] != null) {
      _sliders = [];
      json['Sliders'].forEach((v) {
        _sliders?.add(SliderData.fromJson(v));
      });
    }
  }
  String? _facebook;
  String? _zalo;
  String? _youtube;
  String? _messenger;
  String? _gmail;
  String? _searchKeyword;
  String? _phoneNumber;
  List<SliderData>? _sliders;

  String? get facebook => _facebook;
  String? get zalo => _zalo;
  String? get youtube => _youtube;
  String? get messenger => _messenger;
  String? get gmail => _gmail;
  String? get searchKeyword => _searchKeyword;
  String? get phoneNumber => _phoneNumber;
  List<SliderData>? get sliders => _sliders;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['Facebook'] = _facebook;
    map['Zalo'] = _zalo;
    map['Youtube'] = _youtube;
    map['Messenger'] = _messenger;
    map['Gmail'] = _gmail;
    map['SearchKeyword'] = _searchKeyword;
    map['PhoneNumber'] = _phoneNumber;
    if (_sliders != null) {
      map['Sliders'] = _sliders?.map((v) => v.toJson()).toList();
    }
    return map;
  }
}

/// Src : "/uploads/images/BANER/637682001896521981-1.jpg"
/// Action : "#"
/// Mobile_Url : "#"

class SliderData {
  SliderData({
    String? src,
    String? action,
    String? mobileUrl,
  }) {
    _src = src;
    _action = action;
    _mobileUrl = mobileUrl;
  }

  SliderData.fromJson(dynamic json) {
    _src = json['Src'];
    _action = json['Action'];
    _mobileUrl = json['Mobile_Url'];
  }
  String? _src;
  String? _action;
  String? _mobileUrl;

  String? get src => _src;
  String? get action => _action;
  String? get mobileUrl => _mobileUrl;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['Src'] = _src;
    map['Action'] = _action;
    map['Mobile_Url'] = _mobileUrl;
    return map;
  }
}
