package com.phlx.anchorcollect_p.ui.home;

import android.app.Application;
import android.os.Bundle;

import androidx.annotation.NonNull;


import com.phlx.anchorcollect_p.Configs;
import com.phlx.anchorcollect_p.data.Repository;
import com.phlx.anchorcollect_p.ui.base.MainBarVM;
import com.phlx.anchorcollect_p.ui.main.MainActivity;
import com.phlx.anchorcollect_p.ui.setting.SettingActivity;

import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

public class HomeVM extends MainBarVM<Repository> {

    public HomeVM(@NonNull Application application, Repository repository) {
        super(application, repository);

    }

    //基础档案
    public BindingCommand OnFamilyArchivesClickCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            Bundle mBundle = new Bundle();
            mBundle.putString("COLLECT_TYPT", Configs.BASE_ARCHIVES);
            startActivity(MainActivity.class, mBundle);
        }
    });

    //称重管理
    public BindingCommand OnWeightingManageClickCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {

            Bundle mBundle = new Bundle();
            mBundle.putString("COLLECT_TYPT", Configs.SIGN_MEASURE);
            startActivity(MainActivity.class, mBundle);
        }
    });

    //体征测定
    public BindingCommand OnSignMeasureClickCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {

            Bundle mBundle = new Bundle();
            mBundle.putString("COLLECT_TYPT", Configs.TREATMENT_RECORD);
            startActivity(MainActivity.class, mBundle);
        }
    });

    //健康管理
    public BindingCommand OnHealthManageClickCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {

            Bundle mBundle = new Bundle();
            mBundle.putString("COLLECT_TYPT", Configs.WEIGHTING_MANAGE);
            startActivity(MainActivity.class, mBundle);
        }
    });

    //免疫管理
    public BindingCommand OnImmunManageClickCommand = new BindingCommand(new BindingAction() {
        @Override
        public void call() {

            Bundle mBundle = new Bundle();
            mBundle.putString("COLLECT_TYPT", Configs.IMMUN_RECORD);
            startActivity(SettingActivity.class, mBundle);
        }
    });


}
