class TeamStyleModel {
  String appBarName;
  String appBarNameColor;
  String appBarBgImg;
  String appBarBgColor;
  String bgColor;
  String headerNoReferrerTipText;
  String headerNoReferrerTipTextColor;
  String headerNoReferrerIntputText;
  String headerNoReferrerIntputTextColor;
  String headerNoReferrerBtnText;
  String headerNoReferrerBtnTextColor;
  String headerNoReferrerBtnBgColor;
  String headerReferrerTitle;
  String headerReferrerTitleColor;
  String headerReferrerTitleBgColor;
  String headerReferrerTitleBgColorT;
  String headerReferrerUsernameColor;
  String headerReferrerInvitecodeColor;
  String headerReferrerPhoneColor;
  String headerReferrerWxColor;
  String headerReferrerCopyBtnText;
  String headerReferrerCopyBtnTextColor;
  String headerReferrerCopyBtnIcon;
  String headerReferrerCopyBtnBgColor;
  String dashbordLineColor;
  List<DashbordRowFirst> dashbordRowFirst;
  List<DashbordRowSecond> dashbordRowSecond;
  String searchBarLeftIcon;
  String searchBarRightIcon;
  String searchBarHideText;
  String searchBarHideTextColor;
  String searchBarBgColor;
  String searchBarBtnText;
  String searchBarBtnTextColor;
  String searchBarBtnBgColor;
  String userLvTabsLineColor;
  List<UserLvTabs> userLvTabs;
  String teamViewEmptyImg;
  List<TeamViewSortList> teamViewSortList;
  List<TeamViewItemTitleList> teamViewItemTitleList;
  TeamViewItem teamViewItem;

  String headerNoReferrerInputColor;
  String headerNoReferrerInputBgColor;
  String headerReferrerInvitecodeText;
  String headerReferrerPhoneText;
  String headerReferrerWxText;

  String userLvTabsNameColor;
  String userLvTabsNameSelectedColor;

  TeamStyleModel({
    this.appBarName,
    this.appBarNameColor,
    this.appBarBgImg,
    this.appBarBgColor,
    this.bgColor,
    this.headerNoReferrerTipText,
    this.headerNoReferrerTipTextColor,
    this.headerNoReferrerIntputText,
    this.headerNoReferrerIntputTextColor,
    this.headerNoReferrerBtnText,
    this.headerNoReferrerBtnTextColor,
    this.headerNoReferrerBtnBgColor,
    this.headerReferrerTitle,
    this.headerReferrerTitleColor,
    this.headerReferrerTitleBgColor,
    this.headerReferrerTitleBgColorT,
    this.headerReferrerUsernameColor,
    this.headerReferrerInvitecodeColor,
    this.headerReferrerPhoneColor,
    this.headerReferrerWxColor,
    this.headerReferrerCopyBtnText,
    this.headerReferrerCopyBtnTextColor,
    this.headerReferrerCopyBtnIcon,
    this.headerReferrerCopyBtnBgColor,
    this.dashbordLineColor,
    this.dashbordRowFirst,
    this.dashbordRowSecond,
    this.searchBarLeftIcon,
    this.searchBarRightIcon,
    this.searchBarHideText,
    this.searchBarHideTextColor,
    this.searchBarBgColor,
    this.searchBarBtnText,
    this.searchBarBtnTextColor,
    this.searchBarBtnBgColor,
    this.userLvTabsLineColor,
    this.userLvTabs,
    this.teamViewEmptyImg,
    this.teamViewSortList,
    this.teamViewItemTitleList,
    this.teamViewItem,
    this.headerNoReferrerInputColor,
    this.headerNoReferrerInputBgColor,
    this.headerReferrerInvitecodeText,
    this.headerReferrerPhoneText,
    this.headerReferrerWxText,
    this.userLvTabsNameColor,
    this.userLvTabsNameSelectedColor,
  });

  TeamStyleModel.fromJson(Map<String, dynamic> json) {
    appBarName = json['app_bar_name'];
    appBarNameColor = json['app_bar_name_color'];
    appBarBgImg = json['app_bar_bg_img'];
    appBarBgColor = json['app_bar_bg_color'];
    bgColor = json['bg_color'];
    headerNoReferrerTipText = json['header_no_referrer_tip_text'];
    headerNoReferrerTipTextColor = json['header_no_referrer_tip_text_color'];
    headerNoReferrerIntputText = json['header_no_referrer_intput_text'];
    headerNoReferrerIntputTextColor = json['header_no_referrer_intput_text_color'];
    headerNoReferrerBtnText = json['header_no_referrer_btn_text'];
    headerNoReferrerBtnTextColor = json['header_no_referrer_btn_text_color'];
    headerNoReferrerBtnBgColor = json['header_no_referrer_btn_bg_color'];
    headerReferrerTitle = json['header_referrer_title'];
    headerReferrerTitleColor = json['header_referrer_title_color'];
    headerReferrerTitleBgColor = json['header_referrer_title_bg_color'];
    headerReferrerTitleBgColorT = json['header_referrer_title_bg_color_t'];
    headerReferrerUsernameColor = json['header_referrer_username_color'];
    headerReferrerInvitecodeColor = json['header_referrer_invitecode_color'];
    headerReferrerPhoneColor = json['header_referrer_phone_color'];
    headerReferrerWxColor = json['header_referrer_wx_color'];
    headerReferrerCopyBtnText = json['header_referrer_copy_btn_text'];
    headerReferrerCopyBtnTextColor = json['header_referrer_copy_btn_text_color'];
    headerReferrerCopyBtnIcon = json['header_referrer_copy_btn_icon'];
    headerReferrerCopyBtnBgColor = json['header_referrer_copy_btn_bg_color'];
    dashbordLineColor = json['dashbord_line_color'];
    if (json['dashbord_row_first'] != null) {
      dashbordRowFirst = new List<DashbordRowFirst>();
      json['dashbord_row_first'].forEach((v) {
        dashbordRowFirst.add(new DashbordRowFirst.fromJson(v));
      });
    }
    if (json['dashbord_row_second'] != null) {
      dashbordRowSecond = new List<DashbordRowSecond>();
      json['dashbord_row_second'].forEach((v) {
        dashbordRowSecond.add(new DashbordRowSecond.fromJson(v));
      });
    }
    searchBarLeftIcon = json['search_bar_left_icon'];
    searchBarRightIcon = json['search_bar_right_icon'];
    searchBarHideText = json['search_bar_hide_text'];
    searchBarHideTextColor = json['search_bar_hide_text_color'];
    searchBarBgColor = json['search_bar_bg_color'];
    searchBarBtnText = json['search_bar_btn_text'];
    searchBarBtnTextColor = json['search_bar_btn_text_color'];
    searchBarBtnBgColor = json['search_bar_btn_bg_color'];
    userLvTabsLineColor = json['user_lv_tabs_line_color'];
    if (json['user_lv_tabs'] != null) {
      userLvTabs = new List<UserLvTabs>();
      json['user_lv_tabs'].forEach((v) {
        userLvTabs.add(new UserLvTabs.fromJson(v));
      });
    }
    teamViewEmptyImg = json['team_view_empty_img'];
    if (json['team_view_sort_list'] != null) {
      teamViewSortList = new List<TeamViewSortList>();
      json['team_view_sort_list'].forEach((v) {
        teamViewSortList.add(new TeamViewSortList.fromJson(v));
      });
    }
    if (json['team_view_item_title_list'] != null) {
      teamViewItemTitleList = new List<TeamViewItemTitleList>();
      json['team_view_item_title_list'].forEach((v) {
        teamViewItemTitleList.add(new TeamViewItemTitleList.fromJson(v));
      });
    }
    teamViewItem = json['team_view_item'] != null ? new TeamViewItem.fromJson(json['team_view_item']) : null;
    headerNoReferrerInputColor = json['header_no_referrer_intput_color'];
    headerNoReferrerInputBgColor = json['header_no_referrer_intput_bg_color'];
    headerReferrerInvitecodeText = json['header_referrer_invitecode_text'];
    headerReferrerPhoneText = json['header_referrer_phone_text'];
    headerReferrerWxText = json['header_referrer_wx_text'];
    userLvTabsNameColor = json['user_lv_tabs_name_color'];
    userLvTabsNameSelectedColor = json['user_lv_tabs_name_selected_color'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['app_bar_name'] = this.appBarName;
    data['app_bar_name_color'] = this.appBarNameColor;
    data['app_bar_bg_img'] = this.appBarBgImg;
    data['app_bar_bg_color'] = this.appBarBgColor;
    data['bg_color'] = this.bgColor;
    data['header_no_referrer_tip_text'] = this.headerNoReferrerTipText;
    data['header_no_referrer_tip_text_color'] = this.headerNoReferrerTipTextColor;
    data['header_no_referrer_intput_text'] = this.headerNoReferrerIntputText;
    data['header_no_referrer_intput_text_color'] = this.headerNoReferrerIntputTextColor;
    data['header_no_referrer_btn_text'] = this.headerNoReferrerBtnText;
    data['header_no_referrer_btn_text_color'] = this.headerNoReferrerBtnTextColor;
    data['header_no_referrer_btn_bg_color'] = this.headerNoReferrerBtnBgColor;
    data['header_referrer_title'] = this.headerReferrerTitle;
    data['header_referrer_title_color'] = this.headerReferrerTitleColor;
    data['header_referrer_title_bg_color'] = this.headerReferrerTitleBgColor;
    data['header_referrer_title_bg_color_t'] = this.headerReferrerTitleBgColorT;
    data['header_referrer_username_color'] = this.headerReferrerUsernameColor;
    data['header_referrer_invitecode_color'] = this.headerReferrerInvitecodeColor;
    data['header_referrer_phone_color'] = this.headerReferrerPhoneColor;
    data['header_referrer_wx_color'] = this.headerReferrerWxColor;
    data['header_referrer_copy_btn_text'] = this.headerReferrerCopyBtnText;
    data['header_referrer_copy_btn_text_color'] = this.headerReferrerCopyBtnTextColor;
    data['header_referrer_copy_btn_icon'] = this.headerReferrerCopyBtnIcon;
    data['header_referrer_copy_btn_bg_color'] = this.headerReferrerCopyBtnBgColor;
    data['dashbord_line_color'] = this.dashbordLineColor;
    if (this.dashbordRowFirst != null) {
      data['dashbord_row_first'] = this.dashbordRowFirst.map((v) => v.toJson()).toList();
    }
    if (this.dashbordRowSecond != null) {
      data['dashbord_row_second'] = this.dashbordRowSecond.map((v) => v.toJson()).toList();
    }
    data['search_bar_left_icon'] = this.searchBarLeftIcon;
    data['search_bar_right_icon'] = this.searchBarRightIcon;
    data['search_bar_hide_text'] = this.searchBarHideText;
    data['search_bar_hide_text_color'] = this.searchBarHideTextColor;
    data['search_bar_bg_color'] = this.searchBarBgColor;
    data['search_bar_btn_text'] = this.searchBarBtnText;
    data['search_bar_btn_text_color'] = this.searchBarBtnTextColor;
    data['search_bar_btn_bg_color'] = this.searchBarBtnBgColor;
    data['user_lv_tabs_line_color'] = this.userLvTabsLineColor;
    if (this.userLvTabs != null) {
      data['user_lv_tabs'] = this.userLvTabs.map((v) => v.toJson()).toList();
    }
    data['team_view_empty_img'] = this.teamViewEmptyImg;
    if (this.teamViewSortList != null) {
      data['team_view_sort_list'] = this.teamViewSortList.map((v) => v.toJson()).toList();
    }
    if (this.teamViewItemTitleList != null) {
      data['team_view_item_title_list'] = this.teamViewItemTitleList.map((v) => v.toJson()).toList();
    }
    if (this.teamViewItem != null) {
      data['team_view_item'] = this.teamViewItem.toJson();
    }
    data['header_no_referrer_intput_color'] = this.headerNoReferrerInputColor;
    data['header_no_referrer_intput_bg_color'] = this.headerNoReferrerInputBgColor;
    data['header_referrer_invitecode_text'] = this.headerReferrerInvitecodeText;
    data['header_referrer_phone_text'] = this.headerReferrerPhoneText;
    data['header_referrer_wx_text'] = this.headerReferrerWxText;
    data['user_lv_tabs_name_color'] = this.userLvTabsNameColor;
    data['user_lv_tabs_name_selected_color'] = this.userLvTabsNameSelectedColor;
    return data;
  }
}

class DashbordRowFirst {
  String name;
  String nameColor;
  String valueColor;
  String valueKey;
  String upIcon;
  String bgColor;

  DashbordRowFirst({this.name, this.nameColor, this.valueColor, this.valueKey, this.upIcon, this.bgColor});

  DashbordRowFirst.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    nameColor = json['name_color'];
    valueColor = json['value_color'];
    valueKey = json['value_key'];
    upIcon = json['up_icon'];
    bgColor = json['bg_color'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['name_color'] = this.nameColor;
    data['value_color'] = this.valueColor;
    data['value_key'] = this.valueKey;
    data['up_icon'] = this.upIcon;
    data['bg_color'] = this.bgColor;
    return data;
  }
}

class DashbordRowSecond {
  String bg_color;
  String name;
  String name_color;
  String up_icon;
  String value_color;
  String value_key;

  DashbordRowSecond({this.bg_color, this.name, this.name_color, this.up_icon, this.value_color, this.value_key});

  factory DashbordRowSecond.fromJson(Map<String, dynamic> json) {
    return DashbordRowSecond(
      bg_color: json['bg_color'],
      name: json['name'],
      name_color: json['name_color'],
      up_icon: json['up_icon'],
      value_color: json['value_color'],
      value_key: json['value_key'],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['bg_color'] = this.bg_color;
    data['name'] = this.name;
    data['name_color'] = this.name_color;
    data['up_icon'] = this.up_icon;
    data['value_color'] = this.value_color;
    data['value_key'] = this.value_key;
    return data;
  }
}

class UserLvTabs {
  String name;
  String nameColor;
  String nameSelectedColor;
  String type;

  UserLvTabs({this.name, this.nameColor, this.nameSelectedColor, this.type});

  UserLvTabs.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    nameColor = json['name_color'];
    nameSelectedColor = json['name_selected_color'];
    type = json['type'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['name_color'] = this.nameColor;
    data['name_selected_color'] = this.nameSelectedColor;
    data['type'] = this.type;
    return data;
  }
}

class TeamViewSortList {
  String name;
  String type;
  String nameColor;
  String nameSelectedColor;
  String icon1;
  String icon2;
  String icon3;
  List<Args> args;
  bool isSelect = false;
  int selectState = 0;

  void updateSelectState() {
    selectState++;
    if (selectState > 2) {
      selectState = 0;
    }
  }

  TeamViewSortList({this.name, this.type, this.nameColor, this.icon1, this.icon2, this.icon3, this.args, this.nameSelectedColor});

  TeamViewSortList.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    type = json['type'];
    nameColor = json['name_color'];
    icon1 = json['icon_1'];
    icon2 = json['icon_2'];
    icon3 = json['icon_3'];
    if (json['args'] != null) {
      args = new List<Args>();
      json['args'].forEach((v) {
        args.add(new Args.fromJson(v));
      });
    }
    nameSelectedColor = json['name_selected_color'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['type'] = this.type;
    data['name_color'] = this.nameColor;
    data['icon_1'] = this.icon1;
    data['icon_2'] = this.icon2;
    data['icon_3'] = this.icon3;
    if (this.args != null) {
      data['args'] = this.args.map((v) => v.toJson()).toList();
    }
    data['name_selected_color'] = this.nameSelectedColor;
    return data;
  }
}

class Args {
  String id;
  String queryArgs;
  String name;

  Args({this.id, this.queryArgs, this.name});

  Args.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    queryArgs = json['query_args'];
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['query_args'] = this.queryArgs;
    data['name'] = this.name;
    return data;
  }
}

class TeamViewItemTitleList {
  String text;
  String unitText;
  String textColor;
  String valueColor;
  String valueKey;

  TeamViewItemTitleList({this.text, this.unitText, this.textColor, this.valueColor, this.valueKey});

  TeamViewItemTitleList.fromJson(Map<String, dynamic> json) {
    text = json['text'];
    unitText = json['unit_text'];
    textColor = json['text_color'];
    valueColor = json['value_color'];
    valueKey = json['value_key'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['text'] = this.text;
    data['unit_text'] = this.unitText;
    data['text_color'] = this.textColor;
    data['value_color'] = this.valueColor;
    data['value_key'] = this.valueKey;
    return data;
  }
}

class TeamViewItem {
  String lvTextColor;
  String lvBgColor;
  String lvBgImg;
  String isLvBgImg;
  String directText;
  String directTextColor;
  String directTextBgColor;
  String indirectText;
  String indirectTextColor;
  String indirectTextBgColor;
  String usernameColor;
  String phooneText;
  String phoneColor;
  String phoneCopyIcon;
  String infoBarColor;
  String infoBarWxText;
  String infoBarWxTextColor;
  String infoBarWxValueColor;
  String infoBarLastLoginText;
  String infoBarLastLoginTextColor;
  String infoBarLastLoginValueColor;
  String totalInviteText;
  String totalInviteTextColor;
  String totalInviteValueColor;
  String totalEarningText;
  String totalEarningTextColor;
  String totalEarningValueColor;
  String todayInviteText;
  String todayInviteTextColor;
  String todayInviteValueColor;
  String monthInviteText;
  String monthInviteTextColor;
  String monthInviteValueColor;
  String weekEarningText;
  String weekEarningTextColor;
  String weekEarningValueColor;
  String monthEarningText;
  String monthEarningTextColor;
  String monthEarningValueColor;

  TeamViewItem(
      {this.lvTextColor,
      this.lvBgColor,
      this.lvBgImg,
      this.isLvBgImg,
      this.directText,
      this.directTextColor,
      this.directTextBgColor,
      this.indirectText,
      this.indirectTextColor,
      this.indirectTextBgColor,
      this.usernameColor,
      this.phooneText,
      this.phoneColor,
      this.phoneCopyIcon,
      this.infoBarColor,
      this.infoBarWxText,
      this.infoBarWxTextColor,
      this.infoBarWxValueColor,
      this.infoBarLastLoginText,
      this.infoBarLastLoginTextColor,
      this.infoBarLastLoginValueColor,
      this.totalInviteText,
      this.totalInviteTextColor,
      this.totalInviteValueColor,
      this.totalEarningText,
      this.totalEarningTextColor,
      this.totalEarningValueColor,
      this.todayInviteText,
      this.todayInviteTextColor,
      this.todayInviteValueColor,
      this.monthInviteText,
      this.monthInviteTextColor,
      this.monthInviteValueColor,
      this.weekEarningText,
      this.weekEarningTextColor,
      this.weekEarningValueColor,
      this.monthEarningText,
      this.monthEarningTextColor,
      this.monthEarningValueColor});

  TeamViewItem.fromJson(Map<String, dynamic> json) {
    lvTextColor = json['lv_text_color'];
    lvBgColor = json['lv_bg_color'];
    lvBgImg = json['lv_bg_img'];
    isLvBgImg = json['is_lv_bg_img'];
    directText = json['direct_text'];
    directTextColor = json['direct_text_color'];
    directTextBgColor = json['direct_text_bg_color'];
    indirectText = json['indirect_text'];
    indirectTextColor = json['indirect_text_color'];
    indirectTextBgColor = json['indirect_text_bg_color'];
    usernameColor = json['username_color'];
    phooneText = json['phoone_text'];
    phoneColor = json['phone_color'];
    phoneCopyIcon = json['phone_copy_icon'];
    infoBarColor = json['info_bar_color'];
    infoBarWxText = json['info_bar_wx_text'];
    infoBarWxTextColor = json['info_bar_wx_text_color'];
    infoBarWxValueColor = json['info_bar_wx_value_color'];
    infoBarLastLoginText = json['info_bar_last_login_text'];
    infoBarLastLoginTextColor = json['info_bar_last_login_text_color'];
    infoBarLastLoginValueColor = json['info_bar_last_login_value_color'];
    totalInviteText = json['total_invite_text'];
    totalInviteTextColor = json['total_invite_text_color'];
    totalInviteValueColor = json['total_invite_value_color'];
    totalEarningText = json['total_earning_text'];
    totalEarningTextColor = json['total_earning_text_color'];
    totalEarningValueColor = json['total_earning_value_color'];
    todayInviteText = json['today_invite_text'];
    todayInviteTextColor = json['today_invite_text_color'];
    todayInviteValueColor = json['today_invite_value_color'];
    monthInviteText = json['month_invite_text'];
    monthInviteTextColor = json['month_invite_text_color'];
    monthInviteValueColor = json['month_invite_value_color'];
    weekEarningText = json['week_earning_text'];
    weekEarningTextColor = json['week_earning_text_color'];
    weekEarningValueColor = json['week_earning_value_color'];
    monthEarningText = json['month_earning_text'];
    monthEarningTextColor = json['month_earning_text_color'];
    monthEarningValueColor = json['month_earning_value_color'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['lv_text_color'] = this.lvTextColor;
    data['lv_bg_color'] = this.lvBgColor;
    data['lv_bg_img'] = this.lvBgImg;
    data['is_lv_bg_img'] = this.isLvBgImg;
    data['direct_text'] = this.directText;
    data['direct_text_color'] = this.directTextColor;
    data['direct_text_bg_color'] = this.directTextBgColor;
    data['indirect_text'] = this.indirectText;
    data['indirect_text_color'] = this.indirectTextColor;
    data['indirect_text_bg_color'] = this.indirectTextBgColor;
    data['username_color'] = this.usernameColor;
    data['phoone_text'] = this.phooneText;
    data['phone_color'] = this.phoneColor;
    data['phone_copy_icon'] = this.phoneCopyIcon;
    data['info_bar_color'] = this.infoBarColor;
    data['info_bar_wx_text'] = this.infoBarWxText;
    data['info_bar_wx_text_color'] = this.infoBarWxTextColor;
    data['info_bar_wx_value_color'] = this.infoBarWxValueColor;
    data['info_bar_last_login_text'] = this.infoBarLastLoginText;
    data['info_bar_last_login_text_color'] = this.infoBarLastLoginTextColor;
    data['info_bar_last_login_value_color'] = this.infoBarLastLoginValueColor;
    data['total_invite_text'] = this.totalInviteText;
    data['total_invite_text_color'] = this.totalInviteTextColor;
    data['total_invite_value_color'] = this.totalInviteValueColor;
    data['total_earning_text'] = this.totalEarningText;
    data['total_earning_text_color'] = this.totalEarningTextColor;
    data['total_earning_value_color'] = this.totalEarningValueColor;
    data['today_invite_text'] = this.todayInviteText;
    data['today_invite_text_color'] = this.todayInviteTextColor;
    data['today_invite_value_color'] = this.todayInviteValueColor;
    data['month_invite_text'] = this.monthInviteText;
    data['month_invite_text_color'] = this.monthInviteTextColor;
    data['month_invite_value_color'] = this.monthInviteValueColor;
    data['week_earning_text'] = this.weekEarningText;
    data['week_earning_text_color'] = this.weekEarningTextColor;
    data['week_earning_value_color'] = this.weekEarningValueColor;
    data['month_earning_text'] = this.monthEarningText;
    data['month_earning_text_color'] = this.monthEarningTextColor;
    data['month_earning_value_color'] = this.monthEarningValueColor;
    return data;
  }
}
