package com.tencent.mm.plugin.story.ui.view.editor.item;

import a.f.b.j;
import a.l;
import android.view.MotionEvent;
import android.view.View;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.story.g.h;
import com.tencent.mm.plugin.story.ui.view.editor.item.EditorItemContainer.b;

@l(dWo = {1, 1, 13}, dWp = {"\u0000\u001d\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0018\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u0007H\u0016¨\u0006\b"}, dWq = {"com/tencent/mm/plugin/story/ui/view/editor/item/EditorItemContainer$itemStateResolve$1", "Lcom/tencent/mm/plugin/story/ui/view/editor/item/EditorItemContainer$ItemStateResolve;", "handleItemTouch", "", "itemView", "Landroid/view/View;", "event", "Landroid/view/MotionEvent;", "plugin-story_release"})
public final class EditorItemContainer$d implements b {
    final /* synthetic */ EditorItemContainer smW;

    @l(dWo = {1, 1, 13}, dWp = {"\u0000\b\n\u0000\n\u0002\u0010\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, dWq = {"<anonymous>", "", "run"})
    static final class a implements Runnable {
        final /* synthetic */ View lmb;
        final /* synthetic */ EditorItemContainer$d smX;

        a(EditorItemContainer$d editorItemContainer$d, View view) {
            this.smX = editorItemContainer$d;
            this.lmb = view;
        }

        public final void run() {
            AppMethodBeat.i(110633);
            EditorItemContainer.c(this.smX.smW).removeView(EditorItemContainer.g(this.smX.smW));
            EditorItemContainer.h(this.smX.smW);
            EditorItemContainer.e(this.smX.smW);
            if (this.lmb instanceof e) {
                EditorItemContainer.b(this.smX.smW);
            }
            AppMethodBeat.o(110633);
        }
    }

    EditorItemContainer$d(EditorItemContainer editorItemContainer) {
        this.smW = editorItemContainer;
    }

    public final void e(View view, MotionEvent motionEvent) {
        AppMethodBeat.i(110634);
        j.p(view, "itemView");
        j.p(motionEvent, "event");
        switch (motionEvent.getActionMasked()) {
            case 0:
                this.smW.removeCallbacks(EditorItemContainer.f(this.smW));
                if (view instanceof e) {
                    this.smW.r(view, false);
                    AppMethodBeat.o(110634);
                    return;
                }
                this.smW.r(view, true);
                AppMethodBeat.o(110634);
                return;
            case 1:
            case 3:
                h hVar;
                if (view instanceof b) {
                    hVar = h.scu;
                    h.EU(7);
                }
                if (view instanceof f) {
                    hVar = h.scu;
                    h.EU(9);
                }
                if (view instanceof e) {
                    hVar = h.scu;
                    h.EU(11);
                }
                if (EditorItemContainer.g(this.smW) != null) {
                    this.smW.post(new a(this, view));
                } else if (EditorItemContainer.d(this.smW) != null) {
                    this.smW.postDelayed(EditorItemContainer.f(this.smW), 1500);
                }
                EditorItemContainer.a(this.smW, false);
                EditorItemContainer.i(this.smW);
                EditorItemContainer.j(this.smW);
                EditorItemContainer.k(this.smW);
                EditorItemContainer.l(this.smW);
                break;
            case 2:
                EditorItemContainer.a(this.smW, view);
                EditorItemContainer.a(this.smW, view, motionEvent);
                EditorItemContainer.a(this.smW, true);
                AppMethodBeat.o(110634);
                return;
        }
        AppMethodBeat.o(110634);
    }
}
