package ol.interaction;

import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;
import ol.GenericFunction;
import ol.Options;
import ol.layer.Layer;

/**
 * Options for interaction {@link Select}.
 *
 * @author Tino Desjardins
 *
 */
@JsType(isNative = true)
public interface SelectOptions extends Options{

	/**
	 * 
	 * Style for the selected features. By default the default edit style is used
	 * (see ol.style).
	 *
	 * @param styleFunction
	 */
    @JsProperty
    void setStyle(GenericFunction<?, ?> styleFunction);

	/**
	 * 
	 * A list of layers from which features should be selected. Alternatively, a
	 * filter function can be provided. The function will be called for each layer
	 * in the map and should return true for layers that you want to be
	 * selectable. If the option is absent, all visible layers will be considered
	 * selectable.
	 *
	 * @param layers
	 */
    @JsProperty
    void setLayers(Layer[] layers);

	/**
	 * 
	 * A function that takes an ol.MapBrowserEvent and returns a boolean to
	 * indicate whether that event should be handled. By default, this is
	 * ol.events.condition.never. Use this if you want to use different events for
	 * add and remove instead of toggle.
	 *
	 * @param function
	 */
    @JsProperty
    void setRemoveCondition(GenericFunction<?, ?> function);

	/**
	 * 
	 * A boolean that determines if the default behaviour should select only
	 * single features or all (overlapping) features at the clicked map position.
	 * Default is false i.e single select
	 *
	 * @param multi
	 */
    @JsProperty
    void setMulti(boolean multi);

	/**
	 * 
	 * A function that takes an ol.MapBrowserEvent and returns a boolean to
	 * indicate whether that event should be handled. This is in addition to the
	 * condition event. By default, ol.events.condition.shiftKeyOnly, i.e.
	 * pressing shift as well as the condition event, adds that feature to the
	 * current selection if it is not currently selected, and removes it if it is.
	 * See add and remove if you want to use different events instead of a toggle.
	 *
	 * @param function
	 */
    @JsProperty
    void setToogleCondition(GenericFunction<?, ?> function);

}

@@ -96,16 +96,57 @@
 JsType;%0A
+import ol.Collection;%0Aimport ol.Feature;%0A
 import o
@@ -2227,10 +2227,349 @@
 tion);%0A%0A
+%09/**%0A%09 * Collection where the interaction will place selected features. Optional. If%0A%09 * not set the interaction will create a collection. In any case the%0A%09 * collection used by the interaction is returned by%0A%09 * ol.interaction.Select#getFeatures.%0A%09 *%0A%09 * @param features%0A%09 */%0A%09@JsProperty%0A%09void setFeatures(Collection%3CFeature%3E features);%0A
 %7D%0A

Add setFeatures in SelectOptions