import { IgrSeries } from "./igr-series";
import { ensureBool, fromPoint, toPoint } from "igniteui-react-core/ES2015/componentUtil";
/**
 * Represents the base class for annotation layer types. Annotations will usually disable some of the default hover/touch behaviors of the chart when they are introduced to the series collection.
 * In return they provide some valuable information as the cursor is moved by hovering over the chart, or performing a press-hold-drag interaction in touch mode.
*/
export class IgrAnnotationLayer extends IgrSeries {
    constructor(props) {
        super(props);
    }
    get i() {
        return this._implementation;
    }
    /**
     * Gets or sets whether this series should take up an index for auto brush coloring.
    */
    get useIndex() {
        return this.i.lw;
    }
    set useIndex(v) {
        this.i.lw = ensureBool(v);
    }
    /**
     * Gets or sets whether this series interacts with the chart legend.
    */
    get useLegend() {
        return this.i.lx;
    }
    set useLegend(v) {
        this.i.lx = ensureBool(v);
    }
    /**
     * Gets or sets the world position to use instead of the pointer position for this annotation layer. If you set this value, rather than responding to the pointer, this layer will be fixed on the provided world position.
     * A world position has x and y values that range from 0 to 1 that represent the global position of the cursor relative to the entire ranges of the axes. The default of (NaN, NaN) means that the layer should react to pointer movement.
    */
    get cursorPosition() {
        return fromPoint(this.i.mo);
    }
    set cursorPosition(v) {
        this.i.mo = toPoint(v);
    }
    /**
     * Gets or sets whether the series viewer's default crosshair should be disabled by the presence of this layer.
    */
    get isDefaultCrosshairDisabled() {
        return this.i.lt;
    }
    set isDefaultCrosshairDisabled(v) {
        this.i.lt = ensureBool(v);
    }
    /**
     * Gets whether or not the default crosshair behavior is disabled.
    */
    get isDefaultCrosshairBehaviorDisabled() {
        return this.i.cl;
    }
    /**
     * Gets if the series uses an index, which can be used to auto-assign it a color.
    */
    get isIndexed() {
        return this.i.cv;
    }
    /**
     * Gets if the series should appear in any legends.
    */
    get isUsableInLegend() {
        return this.i.isUsableInLegend;
    }
    /**
     * Gets whether this series is an annotation layer.
    */
    get isAnnotationLayer() {
        return this.i.ci;
    }
    /**
     * Gets or sets whether this layer renders as an overlay or not.
    */
    get shouldRenderAsOverlay() {
        return this.i.lv;
    }
    set shouldRenderAsOverlay(v) {
        this.i.lv = ensureBool(v);
    }
}
