package org.keyscience.models;

import org.keyscience.R;
import org.keyscience.app.Constants;

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

/**
 * Class to model navigation drawer items
 */
public class NavDrawerItem {
    private String title;
    private int icon;

    public int getIcon() {
        return icon;
    }

    public void setIcon(int icon) {
        this.icon = icon;
    }

    public String getTitle() {
        return title;
    }

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

    public static List<NavDrawerItem> getData() {
        List<NavDrawerItem> dataList = new ArrayList<>();
        String[] titles = getTiles();
        for (int i = 0; i < titles.length; i++) {
            NavDrawerItem navDrawerItem = new NavDrawerItem();
            navDrawerItem.setTitle(titles[i]);
            // TODO #4 set item icon
            //    navDrawerItem.setIcon(R.drawable.<replace with corresponding resource name>);
            dataList.add(navDrawerItem);
        }
        return dataList;
    }

    //#3 change nav drawer items with corresponding names
    private static String[] getTiles() {
        return new String[]{
                Constants.HOME,
                Constants.PROGRAMS, // Is dropdown
//                    "Key Challenge",
//                    "Sea Level Rise",
//                    "WaterWatch",
//                    "Reef Restoration",
//                    "Lecture Series",
//                    "Field Activities",
                Constants.RESOURCES//, // Is dropdown
//                    "About Us",
//                    "Newsletters",
//                    "Our Partners",
//                    "Contact Us"
        };
    }

}
