import { CardListViewConfig } from '@dvn/core/models/card-list-view-config';
import { AppViewType, DvnAppViewConfig } from '@dvn/core/models/view-config';
import { AtamaMemberPairDetailViewConfig } from '../../../atama/src/views/atama-member-pair-detail-view-config';
import { AtamaMemberPairsOverviewViewConfig } from '../../../atama/src/views/atama-member-pairs-overview-view-config';
import { TakvimAvailabilitySettingsViewConfig } from '../../../takvim/src/views/takvim-availability-settings-view-config';
export function decodeViewConfig(json) {
  if (json.type === AppViewType.ListViewCard) {
    return CardListViewConfig.decode(json);
  }
  else if (json.type === AppViewType.PairListViewCard) {
    return CardListViewConfig.decode(json);
  }
  else if (json.type === AppViewType.PairListViewCard) {
    return CardListViewConfig.decode(json);
  }
  else if (json.type === AppViewType.AtamaMemberPairDetailView) {
    return AtamaMemberPairDetailViewConfig.decode(json);
  }
  else if (json.type === AppViewType.AtamaMemberPairsOverviewView) {
    return AtamaMemberPairsOverviewViewConfig.decode(json);
  }
  else if (json.type === AppViewType.TakvimAvailabilitySettingsView) {
    return TakvimAvailabilitySettingsViewConfig.decode(json);
  }
  return DvnAppViewConfig.decode(json);
}
