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 ItemClazzAssignmentDetailBindingImpl extends ItemClazzAssignmentDetailBinding  {

    @Nullable
    private static final androidx.databinding.ViewDataBinding.IncludedLayouts sIncludes;
    @Nullable
    private static final android.util.SparseIntArray sViewsWithIds;
    static {
        sIncludes = null;
        sViewsWithIds = new android.util.SparseIntArray();
        sViewsWithIds.put(R.id.item_ca_detail_submission_policy_label, 8);
    }
    // views
    // variables
    // values
    // listeners
    // Inverse Binding Event Handlers

    public ItemClazzAssignmentDetailBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
        this(bindingComponent, root, mapBindings(bindingComponent, root, 9, sIncludes, sViewsWithIds));
    }
    private ItemClazzAssignmentDetailBindingImpl(androidx.databinding.DataBindingComponent bindingComponent, View root, Object[] bindings) {
        super(bindingComponent, root, 0
            , (android.widget.TextView) bindings[5]
            , (android.widget.TextView) bindings[1]
            , (android.widget.TextView) bindings[3]
            , (android.widget.ImageView) bindings[2]
            , (android.widget.TextView) bindings[4]
            , (android.widget.TextView) bindings[7]
            , (android.widget.ImageView) bindings[6]
            , (android.widget.TextView) bindings[8]
            , (androidx.constraintlayout.widget.ConstraintLayout) bindings[0]
            );
        this.itemCaDetailDeadlineLabel.setTag(null);
        this.itemCaDetailDescription.setTag(null);
        this.itemCaDetailDescriptionDeadlineDate.setTag(null);
        this.itemCaDetailDescriptionIcon.setTag(null);
        this.itemCaDetailDescriptionTimezone.setTag(null);
        this.itemCaDetailSubmissionPolicy.setTag(null);
        this.itemCaDetailSubmissionPolicyIcon.setTag(null);
        this.itemClazzAssignmetnDetailDescriptionCl.setTag(null);
        setRootTag(root);
        // listeners
        invalidateAll();
    }

    @Override
    public void invalidateAll() {
        synchronized(this) {
                mDirtyFlags = 0x8L;
        }
        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.submissionStatus == variableId) {
            setSubmissionStatus((com.ustadmobile.lib.db.entities.CourseAssignmentMark) variable);
        }
        else if (BR.timeZone == variableId) {
            setTimeZone((java.lang.String) variable);
        }
        else if (BR.clazzAssignment == variableId) {
            setClazzAssignment((com.ustadmobile.lib.db.entities.ClazzAssignmentWithCourseBlock) variable);
        }
        else {
            variableSet = false;
        }
            return variableSet;
    }

    public void setSubmissionStatus(@Nullable com.ustadmobile.lib.db.entities.CourseAssignmentMark SubmissionStatus) {
        this.mSubmissionStatus = SubmissionStatus;
    }
    public void setTimeZone(@Nullable java.lang.String TimeZone) {
        this.mTimeZone = TimeZone;
        synchronized(this) {
            mDirtyFlags |= 0x2L;
        }
        notifyPropertyChanged(BR.timeZone);
        super.requestRebind();
    }
    public void setClazzAssignment(@Nullable com.ustadmobile.lib.db.entities.ClazzAssignmentWithCourseBlock ClazzAssignment) {
        this.mClazzAssignment = ClazzAssignment;
        synchronized(this) {
            mDirtyFlags |= 0x4L;
        }
        notifyPropertyChanged(BR.clazzAssignment);
        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;
        }
        int stringExtKtVisibleIfNotNullOrEmptyClazzAssignmentCaDescription = 0;
        java.lang.String clazzAssignmentCaDescription = null;
        int clazzAssignmentCaSubmissionPolicy = 0;
        java.util.TimeZone timeZoneGetTimeZoneTimeZone = null;
        com.ustadmobile.lib.db.entities.CourseBlock clazzAssignmentBlock = null;
        java.util.Map<java.lang.Integer,java.lang.Integer> clazzAssignmentDetailOverviewPresenterSUBMISSIONPOLICYOPTIONS = null;
        java.lang.String timeZone = mTimeZone;
        com.ustadmobile.lib.db.entities.ClazzAssignmentWithCourseBlock clazzAssignment = mClazzAssignment;
        long clazzAssignmentBlockCbDeadlineDate = 0;

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

                // read ClazzAssignmentDetailOverviewPresenter.SUBMISSION_POLICY_OPTIONS
                clazzAssignmentDetailOverviewPresenterSUBMISSIONPOLICYOPTIONS = com.ustadmobile.core.controller.ClazzAssignmentDetailOverviewPresenter.getSUBMISSION_POLICY_OPTIONS();
        }
        if ((dirtyFlags & 0xeL) != 0) {



                // read TimeZone.getTimeZone(timeZone)
                timeZoneGetTimeZoneTimeZone = java.util.TimeZone.getTimeZone(timeZone);
                if (clazzAssignment != null) {
                    // read clazzAssignment.block
                    clazzAssignmentBlock = clazzAssignment.getBlock();
                }


                if (clazzAssignmentBlock != null) {
                    // read clazzAssignment.block.cbDeadlineDate
                    clazzAssignmentBlockCbDeadlineDate = clazzAssignmentBlock.getCbDeadlineDate();
                }
            if ((dirtyFlags & 0xcL) != 0) {

                    if (clazzAssignment != null) {
                        // read clazzAssignment.caDescription
                        clazzAssignmentCaDescription = clazzAssignment.getCaDescription();
                        // read clazzAssignment.caSubmissionPolicy
                        clazzAssignmentCaSubmissionPolicy = clazzAssignment.getCaSubmissionPolicy();
                    }


                    // read StringExtKt.visibleIfNotNullOrEmpty(clazzAssignment.caDescription)
                    stringExtKtVisibleIfNotNullOrEmptyClazzAssignmentCaDescription = com.ustadmobile.port.android.view.ext.StringExtKt.visibleIfNotNullOrEmpty(clazzAssignmentCaDescription);
            }
        }
        // batch finished
        if ((dirtyFlags & 0xcL) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setVisibilityIfSetDate(this.itemCaDetailDeadlineLabel, clazzAssignmentBlockCbDeadlineDate);
            this.itemCaDetailDescription.setVisibility(stringExtKtVisibleIfNotNullOrEmptyClazzAssignmentCaDescription);
            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.itemCaDetailDescription, clazzAssignmentCaDescription);
            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setVisibilityIfSetDate(this.itemCaDetailDescriptionDeadlineDate, clazzAssignmentBlockCbDeadlineDate);
            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setVisibilityIfSetDate(this.itemCaDetailDescriptionIcon, clazzAssignmentBlockCbDeadlineDate);
            com.ustadmobile.port.android.view.binding.DatePickerBindingAdapter2Kt.setVisibilityIfSetDate(this.itemCaDetailDescriptionTimezone, clazzAssignmentBlockCbDeadlineDate);
            com.ustadmobile.port.android.view.binding.TextViewBindingsKt.setTextMessageIdOptionSelected(this.itemCaDetailSubmissionPolicy, clazzAssignmentCaSubmissionPolicy);
            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.setImageLookupKey(this.itemCaDetailSubmissionPolicyIcon, clazzAssignmentCaSubmissionPolicy);
        }
        if ((dirtyFlags & 0xeL) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TextViewBindingsKt.setTextLocalDayAndTime(this.itemCaDetailDescriptionDeadlineDate, clazzAssignmentBlockCbDeadlineDate, timeZoneGetTimeZoneTimeZone);
        }
        if ((dirtyFlags & 0xaL) != 0) {
            // api target 1

            androidx.databinding.adapters.TextViewBindingAdapter.setText(this.itemCaDetailDescriptionTimezone, timeZone);
        }
        if ((dirtyFlags & 0x8L) != 0) {
            // api target 1

            com.ustadmobile.port.android.view.binding.TextViewBindingsKt.setTextMessageIdOptions(this.itemCaDetailSubmissionPolicy, clazzAssignmentDetailOverviewPresenterSUBMISSIONPOLICYOPTIONS, (java.lang.Integer)null, (java.lang.String)null);
            com.ustadmobile.port.android.view.binding.ImageViewBindingsKt.setImageLookupMap(this.itemCaDetailSubmissionPolicyIcon, com.ustadmobile.port.android.view.ClazzAssignmentDetailOverviewFragment.SUBMISSION_POLICY_MAP, (java.lang.Integer)null);
        }
    }
    // Listener Stub Implementations
    // callback impls
    // dirty flag
    private  long mDirtyFlags = 0xffffffffffffffffL;
    /* flag mapping
        flag 0 (0x1L): submissionStatus
        flag 1 (0x2L): timeZone
        flag 2 (0x3L): clazzAssignment
        flag 3 (0x4L): null
    flag mapping end*/
    //end
}