package com.facebook.share.widget;

import com.facebook.internal.AppCall;
import com.facebook.internal.DialogPresenter;
import com.facebook.internal.FacebookDialogBase.ModeHandler;
import com.facebook.share.internal.ShareContentValidation;
import com.facebook.share.model.ShareContent;
import com.facebook.share.model.ShareStoryContent;
import com.facebook.share.widget.ShareDialog.Mode;
import com.tencent.matrix.trace.core.AppMethodBeat;

class ShareDialog$ShareStoryHandler extends ModeHandler {
    final /* synthetic */ ShareDialog this$0;

    private ShareDialog$ShareStoryHandler(ShareDialog shareDialog) {
        this.this$0 = shareDialog;
        super(shareDialog);
    }

    public Object getMode() {
        return Mode.NATIVE;
    }

    public boolean canShow(ShareContent shareContent, boolean z) {
        AppMethodBeat.i(97697);
        if ((shareContent instanceof ShareStoryContent) && ShareDialog.access$500(shareContent.getClass())) {
            AppMethodBeat.o(97697);
            return true;
        }
        AppMethodBeat.o(97697);
        return false;
    }

    public AppCall createAppCall(ShareContent shareContent) {
        AppMethodBeat.i(97698);
        ShareContentValidation.validateForStoryShare(shareContent);
        AppCall createBaseAppCall = this.this$0.createBaseAppCall();
        DialogPresenter.setupAppCallForNativeDialog(createBaseAppCall, new 1(this, createBaseAppCall, shareContent, this.this$0.getShouldFailOnDataError()), ShareDialog.access$800(shareContent.getClass()));
        AppMethodBeat.o(97698);
        return createBaseAppCall;
    }
}
