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{

    @JsProperty
    void setStyle(GenericFunction styleFunction);

    @JsProperty
    void setLayers(Layer[] layers);

    @JsProperty
    void setRemoveCondition(GenericFunction function);

    @JsProperty
    void setMulti(boolean multi);

    @JsProperty
    void setToogleCondition(GenericFunction function);

}

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);

}

Add comments to SelectOptions