package org.keyscience.models;

import android.content.Context;

import org.keyscience.R;

import java.util.ArrayList;

public class FieldActivitiesModel extends LectureSeriesModel {
    private int image;
    private String title;
    private String paragraph;

    public static ArrayList<LectureSeriesModel> getData(Context context) {
        ArrayList<LectureSeriesModel> data = new ArrayList<>();
        int[] images = getImages();
        String[] titles = getTitles(context);
        String[] paragraphs = getParagraphs(context);
        for (int i = 0; i < images.length; i++) {
            FieldActivitiesModel model = new FieldActivitiesModel();
            model.setImage(images[i]);
            model.setTitle(titles[i]);
            model.setParagraph(paragraphs[i]);
            data.add(model);
        }
        return data;
    }


    private static String[] getTitles(Context context) {
        String[] titles = {context.getString(R.string.BEACH), context.getString(R.string.FISHINGCLINIC), context.getString(R.string.MANGROVE)};
        return titles;
    }

    private static String[] getParagraphs(Context context) {
        String[] paragraphs = {context.getString(R.string.BEACHParagraph), context.getString(R.string.FISHINGParagraph), context.getString(R.string.MANGROVEParagraph)};
        return paragraphs;
    }

    private static int[] getImages() {
        int[] images = {
                R.drawable.beach_cleanup, R.drawable.fishing_clinic, R.drawable.mangrove_cleanup
        };
        return images;
    }

    public int getImage() {
        return image;
    }

    public void setImage(int image) {
        this.image = image;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getParagraph() {
        return paragraph;
    }

    public void setParagraph(String paragraph) {
        this.paragraph = paragraph;
    }

}
