package com.kfzs.duanduan.react;

import android.support.v4.app.Fragment;

import com.kfzs.duanduan.ActMain;
import com.kfzs.duanduan.fragment.FgtAskgetmoney;
import com.kfzs.duanduan.fragment.FgtFind;
import com.kfzs.duanduan.fragment.FgtNull;
import com.kfzs.duanduan.fragment.FgtPersonalCenter;
import com.kfzs.duanduan.fragment.FgtSmallSheep;
import com.sheep.gamegroup.view.fragment.FgtMainAudit;
import com.sheep.jiuyan.samllsheep.R;

/**
 * Created by realicing on 2018/1/4.
 * realicing@sina.com
 */

public enum MainTab {
    FgtSmallSheep(R.string.main_tab_make_money) {
        @Override
        public Fragment getFragment() {
            return new FgtSmallSheep();
        }
        @Override
        public int getDrawableId() {
            return R.drawable.drawable_selector_task;
        }
    },
    FgtMainAudit(R.string.main_tab_audit) {
        @Override
        public Fragment getFragment() {
            return new FgtMainAudit();
        }

        @Override
        public int getDrawableId() {
            return R.drawable.drawable_selector_audit;
        }
    },
    FgtMainAskGetMoney(R.string.main_tab_invite) {
        @Override
        public Fragment getFragment() {
            return new FgtAskgetmoney();
        }

        @Override
        public int getDrawableId() {
            return R.drawable.drawable_selector_askgetmoney;
        }
    },
    Fgt_Find(R.string.main_tab_find) {
        @Override
        public Fragment getFragment() {
            return new FgtNull();
        }

        @Override
        public int getDrawableId() {
            return R.drawable.drawable_selector_find;
        }
    },
    FgtPersonnalCenter(R.string.personal_center) {
        @Override
        public Fragment getFragment() {
            return new FgtPersonalCenter();
        }

        @Override
        public int getDrawableId() {
            return R.drawable.drawable_selector_personalcenter;
        }
    }
//    ,
    //    Bp(R.string.tab_viewpager_borrowplay) {
//        @Override
//        public Fragment getFragment() {
//            return new FgtBorrowPlay();
//        }
//
//        @Override
//        public int getDrawableId() {
//            return R.drawable.drawable_selector_bp;
//        }
//    },
    ;
    private int stringId;

    MainTab(int stringId) {
        this.stringId = stringId;
    }

    public abstract Fragment getFragment();


    public String getTabName(ActMain activity) {
        return activity.getString(this.stringId);
    }

    public int getStringId() {
        return stringId;
    }

    public abstract int getDrawableId();
}
