package it.integry.integrywmsnative.gest.contenuto_bancale;

import androidx.databinding.DataBindingUtil;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

import it.integry.integrywmsnative.R;
import it.integry.integrywmsnative.core.model.MtbColt;
import it.integry.integrywmsnative.databinding.ActivityContenutoBancaleBinding;
import it.integry.integrywmsnative.gest.contenuto_bancale.viewmodel.ContenutoBancaleViewModel;

import static it.integry.integrywmsnative.gest.contenuto_bancale.ContenutoBancaleActivity.Key.CanRecoverUL;

public class ContenutoBancaleActivity extends AppCompatActivity {

    public ActivityContenutoBancaleBinding bindings;

    private ContenutoBancaleViewModel mViewModel;

    public static class Key {
        public static final String CanRecoverUL = "canRecoverUL";
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        bindings = DataBindingUtil.setContentView(this, R.layout.activity_contenuto_bancale);

        boolean canRecoverUL = getIntent().getBooleanExtra(CanRecoverUL, false);
        MtbColt mtbColt = getIntent().getParcelableExtra("key");
        mViewModel = new ContenutoBancaleViewModel(this, mtbColt, canRecoverUL);

        bindings.waterfallToolbar.setNestedScrollView(bindings.scrollView);

        setSupportActionBar(this.bindings.toolbar);
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);

    }



    @Override
    public boolean onSupportNavigateUp() {
        onBackPressed();
        return true;
    }


}
