package com.gingersoft.gsa.cloud.table.di.module;

import android.content.Context;

import dagger.Binds;
import dagger.Module;
import dagger.Provides;
import okhttp3.OkHttpClient;

import com.gingersoft.gsa.cloud.database.bean.Food;
import com.gingersoft.gsa.cloud.table.mvp.contract.TableContract;
import com.gingersoft.gsa.cloud.table.mvp.model.TableModel;
import com.gingersoft.gsa.cloud.table.mvp.ui.adapter.meal.FoodAdapter;
import com.jess.arms.di.scope.ActivityScope;

import java.util.ArrayList;
import java.util.List;


/**
 * ================================================
 * Description:
 * <p>
 * Created by MVPArmsTemplate on 12/27/2019 19:19
 * <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
 * <a href="https://github.com/JessYanCoding">Follow me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms">Star me</a>
 * <a href="https://github.com/JessYanCoding/MVPArms/wiki">See me</a>
 * <a href="https://github.com/JessYanCoding/MVPArmsTemplate">模版请保持更新</a>
 * ================================================
 */
@Module
public abstract class TableModule {

    @Binds
    abstract TableContract.Model bindTableModel(TableModel model);

    @ActivityScope
    @Provides
    static List<Food> provideFoodList() {
        return new ArrayList<>();
    }

    @ActivityScope
    @Provides
    static FoodAdapter provideFoodAdapter(Context context, List<Food> foodList, int fromType) {
        return new FoodAdapter(context, foodList, fromType);
    }
}