package com.example.mynotepad.MenuFeatures.Folders;

import androidx.appcompat.app.AppCompatActivity;
import androidx.navigation.NavController;
import androidx.navigation.Navigation;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;

import android.os.Bundle;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;

import com.example.mynotepad.MenuFeatures.AllArchivedNotes.MyArchivedNotesRecyclerView.DateOrNote;
import com.example.mynotepad.MenuFeatures.AllArchivedNotes.MyArchivedNotesRecyclerView.MyArchivedAdaptor;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.DateEntity;
import com.example.mynotepad.MenuFeatures.AllNotes.DataBase.Note;
import com.example.mynotepad.MenuFeatures.AllNotes.MyNoteRecyclerView.MyNote;
import com.example.mynotepad.MenuFeatures.Calender.MyCalenderRecyclerView.TimePicker.MyDate;
import com.example.mynotepad.MenuFeatures.CustomToolbarOption;
import com.example.mynotepad.R;
import com.google.android.material.floatingactionbutton.FloatingActionButton;

import java.util.List;

public class FoldersActivity extends AppCompatActivity {

    private FloatingActionButton addNoteButton;
    private CustomToolbarOption customToolbarOption;
    private FrameLayout allNoteToolBar;
    private RecyclerView recyclerView;
    private MyArchivedAdaptor myarchivedAdaptor;
    private List<Note> entityNotes;
    private List<DateEntity> entityDates;
    private List<MyNote> myNotes;
    private List<MyDate> myDates;
    public static DateOrNote chosenDateOrNote;
    private NavController navController;
    private LinearLayout allNotesListLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_folders);
    }

    private void init(View view) {
        // get data from database
        setAllNoteListAndTitles();
        setAllDateNoteListAndTitles();
        customToolbarOption = findViewById(R.id.customToolbarOption);
        customToolbarOption.setVisibility(View.GONE);
        allNoteToolBar = view.findViewById(R.id.toolbar);
        allNoteToolBar.setEnabled(false);
        navController = Navigation.findNavController(view);
        allNotesListLayout = view.findViewById(R.id.allNoteListLayout);

        addNoteButton = view.findViewById(R.id.addButton);

        // show list with recycler view
        recyclerView = view.findViewById(R.id.recyclerView);
        StaggeredGridLayoutManager staggeredGridLayoutManager = new StaggeredGridLayoutManager(2, LinearLayoutManager.VERTICAL);
        myarchivedAdaptor = new MyArchivedAdaptor(myNotes, myDates);
        recyclerView.setAdapter(myarchivedAdaptor);
        recyclerView.setLayoutManager(staggeredGridLayoutManager);

        addListeners();
    }

    private void setAllDateNoteListAndTitles() {
    }

    private void setAllNoteListAndTitles() {
    }

    private void addListeners() {
    }
}