package com.ss.android.ugc.aweme.fe.method.commerce;

import X.0CB;
import X.0CH;
import X.6Is;
import X.7zc;
import X.FIu;
import X.JXB;
import X.JxR;
import X.KKi;
import X.OKi;
import com.bytedance.covode.number.Covode;
import com.ss.android.ugc.aweme.fe.base.BaseCommonJavaMethod;
import com.ss.android.ugc.aweme.out.AVExternalServiceImpl;
import org.json.JSONObject;

public final class VideoPublishMethod extends BaseCommonJavaMethod implements 6Is {
    public static final JXB LIZ = new JXB((byte) 0);

    static {
        Covode.recordClassIndex(76229);
    }

    public VideoPublishMethod(byte b) {
        this();
    }

    public final void onStateChanged(0CH r1, 0CB r2) {
        VideoPublishMethod.super.onStateChanged(r1, r2);
    }

    public /* synthetic */ VideoPublishMethod() {
        this((KKi) null);
    }

    public VideoPublishMethod(KKi kKi) {
        super(kKi);
    }

    public final void handle(JSONObject jSONObject, FIu fIu) {
        String optString;
        JSONObject jSONObject2 = new JSONObject();
        jSONObject2.put("code", -1);
        if (!(jSONObject == null || (optString = jSONObject.optString("path")) == null)) {
            boolean LIZ2 = 7zc.LIZ(optString);
            if (!LIZ2) {
                jSONObject2.put("reason", "path should not be empty");
            } else if (LIZ2) {
                if (!JxR.LIZJ.LJ(optString)) {
                    jSONObject2.put("reason", "filePath doesn't exists");
                } else {
                    AVExternalServiceImpl.LIZ().asyncService("enterprise_service_center", new OKi(optString, this, jSONObject, jSONObject2));
                }
            }
        }
        if (fIu != null) {
            fIu.LIZ(jSONObject2);
        }
    }
}
