// Path: phial-overlay/src/main/java/com/mindcoders/phial/ShareDescription.java
// public class ShareDescription {
//     private final Drawable drawable;
//     private final CharSequence label;
// 
//     /**
//      * @param drawable icon that will be displayed with share option
//      * @param label    label for share option
//      */
//     public ShareDescription(Drawable drawable, CharSequence label) {
//         this.drawable = drawable;
//         this.label = label;
//     }
// 
//     /**
//      * @param context     android context that will be used to load icon and title
//      * @param drawableRes drawableId that will be displayed with share option
//      * @param label       labelId for share option
//      */
//     public ShareDescription(Context context, @DrawableRes int drawableRes, @StringRes int label) {
//         this(ContextCompat.getDrawable(context, drawableRes), context.getString(label));
//     }
// 
//     public Drawable getDrawable() {
//         return drawable;
//     }
// 
//     public CharSequence getLabel() {
//         return label;
//     }
// }
// 
// Path: phial-overlay/src/main/java/com/mindcoders/phial/Shareable.java
// public interface Shareable {
//     /**
//      * Is called when user selects provided share option.
//      * <p>
//      * At the end of share should notify Phial about result of sharing by calling one of
//      * {@link ShareContext#onSuccess()}
//      * {@link ShareContext#onFailed(String)}
//      * {@link ShareContext#onCancel()}
//      * <p>
//      * ShareContext can be used in order to show your custom view or progress when user selected your share option
//      * see {@link ShareContext}
//      *
//      * @param shareContext     used in order to communicate with Phial
//      * @param zippedAttachment file that should be shared
//      * @param message          message provided by user
//      */
//     void share(ShareContext shareContext, File zippedAttachment, String message);
// 
//     /**
//      * Sets icon and title for ShareOption
//      *
//      * @return ShareDescription with icon and title
//      */
//     ShareDescription getDescription();
// }
// 
// Path: phial-overlay/src/main/java/com/mindcoders/phial/internal/util/Precondition.java
// public final class Precondition {
//     private Precondition() {
//         //to hide-
//     }
// 
//     public static <T> T notNull(T item, String message) {
//         if (item == null) {
//             throw new IllegalArgumentException(message);
//         }
// 
//         return item;
//     }
// 
//     public static void calledFromTools(View view) {
//         if (!view.isInEditMode()) {
//             throw new IllegalArgumentException("should be called only from AndroidStudioTools");
//         }
//     }
// 
//     public static void notImplemented(String what, Context context) {
//         Toast.makeText(context, what + " is NOT Implemented yet", Toast.LENGTH_SHORT).show();
//     }
// 
//     public static void isTrue(boolean condition, String message) {
//         if (!condition) {
//             throw new IllegalArgumentException(message);
//         }
//     }
// 
//     public static <T> void notEmpty(T[] array, String message) {
//         if (array == null || array.length == 0) {
//             throw new IllegalArgumentException(message);
//         }
//     }
// 
//     public static void notEmpty(int[] array, String message) {
//         if (array == null || array.length == 0) {
//             throw new IllegalArgumentException(message);
//         }
//     }
// }


import android.content.Context;
import com.mindcoders.phial.ShareDescription;
import com.mindcoders.phial.Shareable;
import com.mindcoders.phial.internal.util.Precondition;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
package com.mindcoders.phial.jira;




/**
 * Created by rost on 10/29/17.
 */
@SuppressWarnings("checkstyle:JavadocMethod")
public class JiraShareableBuilder {
    private final Context context;
    private ShareDescription shareDescription;
    private String baseUrl;
    private String projectKey;
    private final Map<String, Object> extraProperties = new HashMap<>();

    public JiraShareableBuilder(Context context) {
        this.context = context;
        shareDescription = new ShareDescription(
                context.getResources().getDrawable(R.drawable.ic_jira),
                context.getString(R.string.jira_name)
        );
    }

    /**
     * Set the URL of Jira.
     * <p>
     * Required
     *
     * @param baseUrl jira base url
     * @return same instance of builder
     */
    public JiraShareableBuilder setBaseUrl(String baseUrl) {
        Precondition.notNull(baseUrl, "baseUrl should not be null");
        this.baseUrl = baseUrl;
        return this;
    }

    /**
     * Set project key. Issues will be created in project with specified key.
     * <p>
     * Required
     *
     * @param projectKey project key of Jira project.
     * @return
     */
    public JiraShareableBuilder setProjectKey(String projectKey) {
// Path: phial-overlay/src/main/java/com/mindcoders/phial/ShareDescription.java
// public class ShareDescription {
//     private final Drawable drawable;
//     private final CharSequence label;
// 
//     /**
//      * @param drawable icon that will be displayed with share option
//      * @param label    label for share option
//      */
//     public ShareDescription(Drawable drawable, CharSequence label) {
//         this.drawable = drawable;
//         this.label = label;
//     }
// 
//     /**
//      * @param context     android context that will be used to load icon and title
//      * @param drawableRes drawableId that will be displayed with share option
//      * @param label       labelId for share option
//      */
//     public ShareDescription(Context context, @DrawableRes int drawableRes, @StringRes int label) {
//         this(ContextCompat.getDrawable(context, drawableRes), context.getString(label));
//     }
// 
//     public Drawable getDrawable() {
//         return drawable;
//     }
// 
//     public CharSequence getLabel() {
//         return label;
//     }
// }
// 
// Path: phial-overlay/src/main/java/com/mindcoders/phial/Shareable.java
// public interface Shareable {
//     /**
//      * Is called when user selects provided share option.
//      * <p>
//      * At the end of share should notify Phial about result of sharing by calling one of
//      * {@link ShareContext#onSuccess()}
//      * {@link ShareContext#onFailed(String)}
//      * {@link ShareContext#onCancel()}
//      * <p>
//      * ShareContext can be used in order to show your custom view or progress when user selected your share option
//      * see {@link ShareContext}
//      *
//      * @param shareContext     used in order to communicate with Phial
//      * @param zippedAttachment file that should be shared
//      * @param message          message provided by user
//      */
//     void share(ShareContext shareContext, File zippedAttachment, String message);
// 
//     /**
//      * Sets icon and title for ShareOption
//      *
//      * @return ShareDescription with icon and title
//      */
//     ShareDescription getDescription();
// }
// 
// Path: phial-overlay/src/main/java/com/mindcoders/phial/internal/util/Precondition.java
// public final class Precondition {
//     private Precondition() {
//         //to hide-
//     }
// 
//     public static <T> T notNull(T item, String message) {
//         if (item == null) {
//             throw new IllegalArgumentException(message);
//         }
// 
//         return item;
//     }
// 
//     public static void calledFromTools(View view) {
//         if (!view.isInEditMode()) {
//             throw new IllegalArgumentException("should be called only from AndroidStudioTools");
//         }
//     }
// 
//     public static void notImplemented(String what, Context context) {
//         Toast.makeText(context, what + " is NOT Implemented yet", Toast.LENGTH_SHORT).show();
//     }
// 
//     public static void isTrue(boolean condition, String message) {
//         if (!condition) {
//             throw new IllegalArgumentException(message);
//         }
//     }
// 
//     public static <T> void notEmpty(T[] array, String message) {
//         if (array == null || array.length == 0) {
//             throw new IllegalArgumentException(message);
//         }
//     }
// 
//     public static void notEmpty(int[] array, String message) {
//         if (array == null || array.length == 0) {
//             throw new IllegalArgumentException(message);
//         }
//     }
// }


// Path: phial-jira/src/main/java/com/mindcoders/phial/jira/JiraShareableBuilder.java
import android.content.Context;
import com.mindcoders.phial.ShareDescription;
import com.mindcoders.phial.Shareable;
import com.mindcoders.phial.internal.util.Precondition;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

package com.mindcoders.phial.jira;




/**
 * Created by rost on 10/29/17.
 */
@SuppressWarnings("checkstyle:JavadocMethod")
public class JiraShareableBuilder {
    private final Context context;
    private ShareDescription shareDescription;
    private String baseUrl;
    private String projectKey;
    private final Map<String, Object> extraProperties = new HashMap<>();

    public JiraShareableBuilder(Context context) {
        this.context = context;
        shareDescription = new ShareDescription(
                context.getResources().getDrawable(R.drawable.ic_jira),
                context.getString(R.string.jira_name)
        );
    }

    /**
     * Set the URL of Jira.
     * <p>
     * Required
     *
     * @param baseUrl jira base url
     * @return same instance of builder
     */
    public JiraShareableBuilder setBaseUrl(String baseUrl) {
        Precondition.notNull(baseUrl, "baseUrl should not be null");
        this.baseUrl = baseUrl;
        return this;
    }

    /**
     * Set project key. Issues will be created in project with specified key.
     * <p>
     * Required
     *
     * @param projectKey project key of Jira project.
     * @return
     */
    public JiraShareableBuilder setProjectKey(String projectKey) {
        Precondition.notNull(projectKey, "projectKey should not be null");