package com.tencent.mm.plugin.appbrand.jsapi;

import android.graphics.Rect;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.page.w;
import com.tencent.mm.plugin.appbrand.r.g;
import com.tencent.mm.sdk.platformtools.ab;
import org.json.JSONException;
import org.json.JSONObject;

public final class JsApiShowImageOperateSheet extends a<w> {
    public static final int CTRL_INDEX = 626;
    public static final String NAME = "showImageOperateSheet";

    public final /* synthetic */ void a(c cVar, JSONObject jSONObject, int i) {
        AppMethodBeat.i(130620);
        w wVar = (w) cVar;
        try {
            String string = jSONObject.getString("imageUrl");
            String string2 = jSONObject.getString("imageBase64");
            int qb = g.qb(jSONObject.getInt("elementLeft"));
            int qb2 = g.qb(jSONObject.getInt("elementTop"));
            new BottomSheetLogicHelper(wVar, string, string2, new Rect(qb, qb2, g.qb(jSONObject.getInt("elementWidth")) + qb, g.qb(jSONObject.getInt("elementHeight")) + qb2)).aCm();
            wVar.M(i, j("ok", null));
            AppMethodBeat.o(130620);
        } catch (JSONException e) {
            ab.e("MicroMsg.JsApiShowImageOperateSheet", "fail exp:%s", new Object[]{e.getLocalizedMessage()});
            wVar.M(i, j("fail invalid params", null));
            AppMethodBeat.o(130620);
        }
    }
}
