// Path: src/core/src/main/java/net/gsantner/opoc/util/Callback.java
// @SuppressWarnings("unused")
// public class Callback {
//     public interface a1<A> {
//         void callback(A arg1);
//     }
// 
//     public interface a2<A, B> {
//         void callback(A arg1, B arg2);
//     }
// 
//     public interface a3<A, B, C> {
//         void callback(A arg1, B arg2, C arg3);
//     }
// 
//     public interface a4<A, B, C, D> {
//         void callback(A arg1, B arg2, C arg3, D arg4);
//     }
// 
//     public interface a5<A, B, C, D, E> {
//         void callback(A arg1, B arg2, C arg3, D arg4, E arg5);
//     }
// }
// 
// Path: src/app/src/main/java/io/github/lonamiwebs/stringlate/utilities/Constants.java
// public final static String EXTRA_ID = "io.github.lonamiwebs.stringlate.ID";


import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import net.gsantner.opoc.util.Callback;
import io.github.lonamiwebs.stringlate.R;
import static io.github.lonamiwebs.stringlate.utilities.Constants.EXTRA_ID;

                @Override
                protected void onProgressUpdate(String... values) {
                    mInfoTextView.setText(values[0]);
                }

                @Override
                protected void onPostExecute(final String postedUrl) {
                    if (postedUrl == null) {
                        if (mPostUrlCallable.mFailureReason.isEmpty())
                            mPostUrlCallable.mFailureReason = getString(R.string.something_went_wrong);

                        Toast.makeText(CreateUrlActivity.this,
                                mPostUrlCallable.mFailureReason, Toast.LENGTH_SHORT).show();
                        finish();
                    } else {
                        mPostedUrl = postedUrl;
                        mIndeterminateBar.setVisibility(View.GONE);
                        mSuccessLinearLayout.setVisibility(View.VISIBLE);

                        mInfoTextView.setText(mPostUrlCallable.getSuccessDescription(CreateUrlActivity.this));
                        ((EditText) findViewById(R.id.postedUrlEditText)).setText(mPostedUrl);
                    }
                }
            }.execute();
        }
    }

    public static void launchIntent(final Context ctx, final int exporterHandle) {
        ctx.startActivity(new Intent(ctx, CreateUrlActivity.class)
// Path: src/core/src/main/java/net/gsantner/opoc/util/Callback.java
// @SuppressWarnings("unused")
// public class Callback {
//     public interface a1<A> {
//         void callback(A arg1);
//     }
// 
//     public interface a2<A, B> {
//         void callback(A arg1, B arg2);
//     }
// 
//     public interface a3<A, B, C> {
//         void callback(A arg1, B arg2, C arg3);
//     }
// 
//     public interface a4<A, B, C, D> {
//         void callback(A arg1, B arg2, C arg3, D arg4);
//     }
// 
//     public interface a5<A, B, C, D, E> {
//         void callback(A arg1, B arg2, C arg3, D arg4, E arg5);
//     }
// }
// 
// Path: src/app/src/main/java/io/github/lonamiwebs/stringlate/utilities/Constants.java
// public final static String EXTRA_ID = "io.github.lonamiwebs.stringlate.ID";


// Path: src/app/src/main/java/io/github/lonamiwebs/stringlate/activities/export/CreateUrlActivity.java
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import net.gsantner.opoc.util.Callback;
import io.github.lonamiwebs.stringlate.R;
import static io.github.lonamiwebs.stringlate.utilities.Constants.EXTRA_ID;


                @Override
                protected void onProgressUpdate(String... values) {
                    mInfoTextView.setText(values[0]);
                }

                @Override
                protected void onPostExecute(final String postedUrl) {
                    if (postedUrl == null) {
                        if (mPostUrlCallable.mFailureReason.isEmpty())
                            mPostUrlCallable.mFailureReason = getString(R.string.something_went_wrong);

                        Toast.makeText(CreateUrlActivity.this,
                                mPostUrlCallable.mFailureReason, Toast.LENGTH_SHORT).show();
                        finish();
                    } else {
                        mPostedUrl = postedUrl;
                        mIndeterminateBar.setVisibility(View.GONE);
                        mSuccessLinearLayout.setVisibility(View.VISIBLE);

                        mInfoTextView.setText(mPostUrlCallable.getSuccessDescription(CreateUrlActivity.this));
                        ((EditText) findViewById(R.id.postedUrlEditText)).setText(mPostedUrl);
                    }
                }
            }.execute();
        }
    }

    public static void launchIntent(final Context ctx, final int exporterHandle) {
        ctx.startActivity(new Intent(ctx, CreateUrlActivity.class)
                .putExtra(EXTRA_ID, exporterHandle));