import 'package:fcs/domain/entities/setting.dart';

class Contact {
  String usaAddress;
  String mmAddress;
  String usaContactNumber;
  String mmContactNumber;
  String emailAddress;
  String facebookLink;

  Contact({
    this.usaAddress,
    this.mmAddress,
    this.usaContactNumber,
    this.mmContactNumber,
    this.emailAddress,
    this.facebookLink,
  });

  factory Contact.fromSetting(Setting setting) {
    return Contact(
        usaContactNumber: setting.usaContactNumber,
        mmContactNumber: setting.mmContactNumber,
        usaAddress: setting.usaAddress,
        mmAddress: setting.mmAddress,
        emailAddress: setting.emailAddress,
        facebookLink: setting.facebookLink);
  }

  Map<String, dynamic> toMap() {
    return {
      'usa_address': usaAddress,
      'mm_address': mmAddress,
      'usa_contact_number': usaContactNumber,
      'mm_contact_number': mmContactNumber,
      'email_address': emailAddress,
      'facebook_link': facebookLink,
    };
  }

  @override
  String toString() {
    return 'Contact{usa_address:$usaAddress,mm_address:$mmAddress}';
  }
}
