package com.toughra.ustadmobile.databinding;
import com.toughra.ustadmobile.R;
import com.toughra.ustadmobile.BR;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import android.view.View;
@SuppressWarnings("unchecked")
public class FragmentVideoContentBindingImpl extends FragmentVideoContentBinding  {

    @Nullable
    private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
    @Nullable
    private static final android.util.SparseIntArray sViewsWithIds;
    static {
        sIncludes = null;
        sViewsWithIds = null;
    }
    // views
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers

    public FragmentVideoContentBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 4, sIncludes, sViewsWithIds));
    }
    private FragmentVideoContentBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (android.widget.TextView) bindings[3]
            , (com.google.android.exoplayer2.ui.PlayerView) bindings[1]
            , (com.google.android.exoplayer2.ui.PlayerControlView) bindings[2]
            , (androidx.core.widget.NestedScrollView) bindings[0]
            );
        this.activityVideoPlayerDescription.setTag(null);
        this.activityVideoPlayerView.setTag(null);
        this.playerViewControls.setTag(null);
        this.videoScroll.setTag(null);
        setRootTag(root);
        // listeners
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x4L;
        }
        requestRebind();
    }

    @Override
    public boolean hasPendingBindings() {
        synchronized(this) {
            if (mDirtyFlags != 0) {
                return true;
            }
        }
        return false;
    }

    @Override
    public boolean setVariable(int variableId, @Nullable Object variable)  {
        boolean variableSet = true;
        if (BR.isPortrait == variableId) {
            setIsPortrait((java.lang.Boolean) variable);
        }
        else if (BR.entry == variableId) {
            setEntry((com.ustadmobile.lib.db.entities.ContentEntry) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setIsPortrait(@Nullable java.lang.Boolean IsPortrait) {
        this.mIsPortrait = IsPortrait;
        synchronized(this) {
            mDirtyFlags |= 0x1L;
        }
        notifyPropertyChanged(BR.isPortrait);
        super.requestRebind();
    }
    public void setEntry(@Nullable com.ustadmobile.lib.db.entities.ContentEntry Entry) {
        this.mEntry = Entry;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.entry);
        super.requestRebind();
    }

    @Override
    protected boolean onFieldChange(int localFieldId, Object object, int fieldId) {
        switch (localFieldId) {
        }
        return false;
    }

    @Override
    protected void executeBindings() {
        long dirtyFlags = 0;
        synchronized(this) {
            dirtyFlags = mDirtyFlags;
            mDirtyFlags = 0;
        }
        boolean androidxDatabindingViewDataBindingSafeUnboxIsPortrait = false;
        int isPortraitViewVISIBLEViewGONE = 0;
        java.lang.String entryDescription = null;
        java.lang.Boolean isPortrait = mIsPortrait;
        com.ustadmobile.lib.db.entities.ContentEntry entry = mEntry;
        float isPortraitFloat06fFloat0999f = 0f;

        if ((dirtyFlags & 0x5L) != 0) {



                // read androidx.databinding.ViewDataBinding.safeUnbox(isPortrait)
                androidxDatabindingViewDataBindingSafeUnboxIsPortrait = androidx.databinding.ViewDataBinding.safeUnbox(isPortrait);
            if((dirtyFlags & 0x5L) != 0) {
                if(androidxDatabindingViewDataBindingSafeUnboxIsPortrait) {
                        dirtyFlags |= 0x10L;
                        dirtyFlags |= 0x40L;
                }
                else {
                        dirtyFlags |= 0x8L;
                        dirtyFlags |= 0x20L;
                }
            }


                // read androidx.databinding.ViewDataBinding.safeUnbox(isPortrait) ? View.VISIBLE : View.GONE
                isPortraitViewVISIBLEViewGONE = ((androidxDatabindingViewDataBindingSafeUnboxIsPortrait) ? (android.view.View.VISIBLE) : (android.view.View.GONE));
                // read androidx.databinding.ViewDataBinding.safeUnbox(isPortrait) ? 0.6f : 0.999f
                isPortraitFloat06fFloat0999f = ((androidxDatabindingViewDataBindingSafeUnboxIsPortrait) ? (0.6f) : (0.999f));
        }
        if ((dirtyFlags & 0x6L) != 0) {



                if (entry != null) {
                    // read entry.description
                    entryDescription = entry.getDescription();
                }
        }
        // batch finished
        if ((dirtyFlags & 0x6L) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.activityVideoPlayerDescription, entryDescription);
        }
        if ((dirtyFlags & 0x5L) != 0) {
            // api target 1

            this.activityVideoPlayerDescription.setVisibility(isPortraitViewVISIBLEViewGONE);
            com.ustadmobile.port.android.view.binding.ViewBindingsKt.setPercentageHeight(this.activityVideoPlayerView, isPortraitFloat06fFloat0999f);
            this.playerViewControls.setVisibility(isPortraitViewVISIBLEViewGONE);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): isPortrait
        flag 1 (0x2L): entry
        flag 2 (0x3L): null
        flag 3 (0x4L): androidx.databinding.ViewDataBinding.safeUnbox(isPortrait) ? View.VISIBLE : View.GONE
        flag 4 (0x5L): androidx.databinding.ViewDataBinding.safeUnbox(isPortrait) ? View.VISIBLE : View.GONE
        flag 5 (0x6L): androidx.databinding.ViewDataBinding.safeUnbox(isPortrait) ? 0.6f : 0.999f
        flag 6 (0x7L): androidx.databinding.ViewDataBinding.safeUnbox(isPortrait) ? 0.6f : 0.999f
    flag mapping end*/
    //end
}