package it.integry.wms.dynamic_customization.extensions;

import it.integry.integrywmsnative.core.class_router.configs.BaseMenuConfiguration;
import it.integry.integrywmsnative.core.model.secondary.GestioneEnum;
import it.integry.integrywmsnative.gest.accettazione.MainAccettazioneFragment;
import it.integry.integrywmsnative.gest.ordini_uscita_elenco.OrdiniUscitaElencoFragment;
import it.integry.integrywmsnative.gest.picking_libero.PickingLiberoFragment;
import it.integry.integrywmsnative.gest.rettifica_giacenze.RettificaGiacenzeFragment;
import it.integry.integrywmsnative.gest.versamento_merce.VersamentoMerceFragment;

public class MenuConfigurationVG extends BaseMenuConfiguration {

    public MenuConfigurationVG() {

        this
                .addGroup(
                        new MenuGroup()
                                .setGroupText(it.integry.integrywmsnative.R.string.purchase)
                                .setGroupId(it.integry.integrywmsnative.R.id.nav_group_acquisto)

                                .addItem(new MenuItem()
                                        .setID(it.integry.integrywmsnative.R.id.nav_accettazione)
                                        .setTitleText(it.integry.integrywmsnative.R.string.accettazione_title_fragment)
                                        .setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_accettazione)
                                        .setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_download)
                                        .setFragmentFactory(MainAccettazioneFragment::newInstance))
                ).addGroup(
                        new MenuGroup()
                                .setGroupText(it.integry.integrywmsnative.R.string.checkout)
                                .setGroupId(it.integry.integrywmsnative.R.id.nav_group_spedizione)

                                .addItem(new MenuItem()
                                        .setID(it.integry.integrywmsnative.R.id.nav_spedizione)
                                        .setTitleText(it.integry.integrywmsnative.R.string.vendita_title_fragment)
                                        .setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_spedizione)
                                        .setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_upload)
                                        .setFragmentFactory(() -> OrdiniUscitaElencoFragment.newInstance(GestioneEnum.VENDITA, null, -1, null)))

                                .addItem(new MenuItem()
                                        .setID(it.integry.integrywmsnative.R.id.nav_free_picking)
                                        .setTitleText(it.integry.integrywmsnative.R.string.free_picking)
                                        .setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_picking_libero)
                                        .setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_barcode_scanner)
                                        .setFragmentFactory(() -> PickingLiberoFragment.newInstance(GestioneEnum.VENDITA)))
                )
                .addGroup(
                        new MenuGroup()
                                .setGroupText(it.integry.integrywmsnative.R.string.internal_handling)
                                .setGroupId(it.integry.integrywmsnative.R.id.nav_group_movimentazione_interna)

                                .addItem(new MenuItem()
                                        .setID(it.integry.integrywmsnative.R.id.nav_versamento_merce)
                                        .setTitleText(it.integry.integrywmsnative.R.string.versamento_merce_fragment_title)
                                        .setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_versamento_merce)
                                        .setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_load_shelf)
                                        .setFragmentFactory(VersamentoMerceFragment::newInstance))

                                .addItem(new MenuItem()
                                        .setID(it.integry.integrywmsnative.R.id.nav_rettifica_giacenze)
                                        .setTitleText(it.integry.integrywmsnative.R.string.rettifica_giacenze_fragment_title)
                                        .setTitleIcon(it.integry.integrywmsnative.R.drawable.ic_dashboard_rettifica_giacenze)
                                        .setDrawerIcon(it.integry.integrywmsnative.R.drawable.ic_black_empty_box)
                                        .setFragmentFactory(RettificaGiacenzeFragment::newInstance))


                );

    }

}