package com.ss.android.ugc.aweme.services;

import X.C1817Mvs;
import X.C2711NOo;
import X.C2712NOp;
import X.C2720NOx;
import X.C2735NPm;
import X.C2737NPo;
import X.M12;
import X.NXR;
import com.bytedance.covode.number.Covode;
import kotlin.h.b.n;

public final class SplitShootBottomTabModule$createBottomTabItem$1 implements C2737NPo {
    public final /* synthetic */ C2735NPm $tabEnv;
    public final /* synthetic */ SplitShootBottomTabModule this$0;

    static {
        Covode.recordClassIndex(105176);
    }

    public SplitShootBottomTabModule$createBottomTabItem$1(SplitShootBottomTabModule splitShootBottomTabModule, C2735NPm nPm) {
        this.this$0 = splitShootBottomTabModule;
        this.$tabEnv = nPm;
    }

    public final boolean onTabUnselected(NXR nxr, C2720NOx nOx) {
        C2711NOo splitShootApiComponent;
        M12.LIZ(nxr, nOx);
        if ((!n.LIZ(nOx.LJ, "RecordCombinePhoto")) && (splitShootApiComponent = this.this$0.getSplitShootApiComponent()) != null) {
            splitShootApiComponent.LIZ(false);
        }
        C1817Mvs speedApiComponent = this.this$0.getSpeedApiComponent();
        if (speedApiComponent != null) {
            speedApiComponent.LIZ(0);
        }
        return false;
    }

    public final boolean onTabSelected(NXR nxr, C2720NOx nOx) {
        C2711NOo splitShootApiComponent;
        M12.LIZ(nxr, nOx);
        this.this$0.getRecordControlApi().LIZ((Class<? extends Object>) C2712NOp.class);
        if (!this.this$0.getShortVideoContext().LJJJJLL && (splitShootApiComponent = this.this$0.getSplitShootApiComponent()) != null) {
            splitShootApiComponent.LIZ(true);
        }
        C1817Mvs speedApiComponent = this.this$0.getSpeedApiComponent();
        if (speedApiComponent != null) {
            speedApiComponent.LIZ(-this.$tabEnv.LIZ().getResources().getDimensionPixelOffset(2131165315));
        }
        C2711NOo splitShootApiComponent2 = this.this$0.getSplitShootApiComponent();
        if (splitShootApiComponent2 != null) {
            splitShootApiComponent2.LIZ(nOx);
        }
        return true;
    }
}
