// 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;
        for (String version : versions) {
            Map versionObj = Collections.singletonMap("name", version);
            objects.add(versionObj);
        }
        return setCustomField("fixVersions", objects);
    }

    /**
     * Sets fixVersions for create issue
     * <p>
     * Optioanl
     *
     * @param versions valid Jira versions
     * @return same instance of builder
     */
    public JiraShareableBuilder setAffectsVersions(String... versions) {
        final List<Map> objects = new ArrayList<>(versions.length);
        for (String version : versions) {
            Map versionObj = Collections.singletonMap("name", version);
            objects.add(versionObj);
        }
        return setCustomField("versions", objects);
    }

    /**
     * Creates Shareable that should be included in PhialOverlay
     * {@link com.mindcoders.phial.PhialBuilder#addShareable(Shareable)}
     *
     * @return Sharable that provides Jira share option
     */
// 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;

        for (String version : versions) {
            Map versionObj = Collections.singletonMap("name", version);
            objects.add(versionObj);
        }
        return setCustomField("fixVersions", objects);
    }

    /**
     * Sets fixVersions for create issue
     * <p>
     * Optioanl
     *
     * @param versions valid Jira versions
     * @return same instance of builder
     */
    public JiraShareableBuilder setAffectsVersions(String... versions) {
        final List<Map> objects = new ArrayList<>(versions.length);
        for (String version : versions) {
            Map versionObj = Collections.singletonMap("name", version);
            objects.add(versionObj);
        }
        return setCustomField("versions", objects);
    }

    /**
     * Creates Shareable that should be included in PhialOverlay
     * {@link com.mindcoders.phial.PhialBuilder#addShareable(Shareable)}
     *
     * @return Sharable that provides Jira share option
     */
    public Shareable build() {