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

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.ipc.AppBrandProxyUIProcessTask.ProcessResult;
import com.tencent.mm.plugin.appbrand.ipc.AppBrandProxyUIProcessTask.b;
import com.tencent.mm.plugin.appbrand.jsapi.c;
import com.tencent.mm.plugin.appbrand.jsapi.media.JsApiChooseMultiMedia.ChooseResult;
import com.tencent.mm.sdk.platformtools.ab;
import java.util.HashMap;
import org.json.JSONArray;

class JsApiChooseMultiMedia$3 implements b<ChooseResult> {
    final /* synthetic */ int eIl;
    final /* synthetic */ c hIt;
    final /* synthetic */ JsApiChooseMultiMedia hPH;

    JsApiChooseMultiMedia$3(JsApiChooseMultiMedia jsApiChooseMultiMedia, c cVar, int i) {
        this.hPH = jsApiChooseMultiMedia;
        this.hIt = cVar;
        this.eIl = i;
    }

    public final /* synthetic */ void c(ProcessResult processResult) {
        AppMethodBeat.i(131219);
        ChooseResult chooseResult = (ChooseResult) processResult;
        if (chooseResult == null) {
            this.hIt.M(this.eIl, this.hPH.j("fail", null));
            AppMethodBeat.o(131219);
            return;
        }
        switch (chooseResult.bFZ) {
            case -1:
                HashMap hashMap = new HashMap();
                try {
                    hashMap.put("tempFiles", new JSONArray(chooseResult.hPI));
                } catch (Exception e) {
                    ab.e("MicroMsg.JsApiChooseMultiMedia", "err tempFiles json object create");
                }
                this.hIt.M(this.eIl, this.hPH.j("ok", hashMap));
                AppMethodBeat.o(131219);
                return;
            case 0:
                this.hIt.M(this.eIl, this.hPH.j("cancel", null));
                AppMethodBeat.o(131219);
                return;
            default:
                this.hIt.M(this.eIl, this.hPH.j("fail", null));
                AppMethodBeat.o(131219);
                return;
        }
    }
}
