import * as tslib_1 from "tslib";
import { delegateCombine, delegateRemove } from "igniteui-react-core/ES5/type";
import { CalloutCollisionMode_$type } from "./CalloutCollisionMode";
import { CalloutStyleUpdatingEventArgs } from "./igr-callout-style-updating-event-args";
import { CalloutContentUpdatingEventArgs } from "./igr-callout-content-updating-event-args";
import { CalloutLabelUpdatingEventArgs } from "./igr-callout-label-updating-event-args";
import { CalloutSeriesSelectingEventArgs } from "./igr-callout-series-selecting-event-args";
import { IgrAnnotationLayer } from "./igr-annotation-layer";
import { CalloutLayer } from "./CalloutLayer";
import { ensureBool, brushToString, stringToBrush, ensureEnum } from "igniteui-react-core/ES5/componentUtil";
/**
 * Represents an annotation layer that displays crosshair lines that cross through the closest value of the target series under the cursor.
*/
var IgrCalloutLayer = /** @class */ (function (_super) {
    tslib_1.__extends(IgrCalloutLayer, _super);
    function IgrCalloutLayer(props) {
        var _this = _super.call(this, props) || this;
        _this._calloutStyleUpdating = null;
        _this._calloutStyleUpdating_wrapped = null;
        _this._calloutContentUpdating = null;
        _this._calloutContentUpdating_wrapped = null;
        _this._calloutLabelUpdating = null;
        _this._calloutLabelUpdating_wrapped = null;
        _this._calloutSeriesSelecting = null;
        _this._calloutSeriesSelecting_wrapped = null;
        return _this;
    }
    IgrCalloutLayer.prototype.createImplementation = function () {
        return new CalloutLayer();
    };
    Object.defineProperty(IgrCalloutLayer.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "labelMemberPath", {
        /**
         * Gets or sets the label mapping property for the callouts.
        */
        get: function () {
            return this.i.o3;
        },
        set: function (v) {
            this.i.o3 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "xMemberPath", {
        /**
         * Gets or sets the label mapping property for the callouts.
        */
        get: function () {
            return this.i.pa;
        },
        set: function (v) {
            this.i.pa = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "yMemberPath", {
        /**
         * Gets or sets the label mapping property for the callouts.
        */
        get: function () {
            return this.i.pd;
        },
        set: function (v) {
            this.i.pd = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "keyMemberPath", {
        /**
         * Gets or sets the key mapping property for the callouts.
        */
        get: function () {
            return this.i.o0;
        },
        set: function (v) {
            this.i.o0 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "isCalloutOffsettingEnabled", {
        /**
         * Gets or sets whether to allow the callouts to be variable distances from the target points, for suppporting collision modes.
        */
        get: function () {
            return this.i.np;
        },
        set: function (v) {
            this.i.np = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "contentMemberPath", {
        /**
         * Gets or sets the content mapping property for the callouts.
        */
        get: function () {
            return this.i.ou;
        },
        set: function (v) {
            this.i.ou = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "targetSeries", {
        /**
         * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.
        */
        get: function () {
            if (this.i.m1 == null) {
                return null;
            }
            return this.i.m1.externalObject;
        },
        set: function (v) {
            v == null ? this.i.m1 = null : this.i.m1 = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "collisionChannel", {
        /**
         * Gets or sets a channel name to identify other callout layers within the chart to share collision information with.
        */
        get: function () {
            return this.i.or;
        },
        set: function (v) {
            this.i.or = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "isAutoCalloutBehaviorEnabled", {
        /**
         * Gets or sets how to select the final value to annotate.
        */
        get: function () {
            return this.i.no;
        },
        set: function (v) {
            this.i.no = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "useValueForAutoCalloutLabels", {
        /**
         * Gets or sets whether to use values, rather than labels for auto callout labels.
        */
        get: function () {
            return this.i.nr;
        },
        set: function (v) {
            this.i.nr = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "isCustomCalloutStyleEnabled", {
        /**
         * Gets or sets whether to allow for custom callout styles.
        */
        get: function () {
            return this.i.nq;
        },
        set: function (v) {
            this.i.nq = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "autoCalloutLabelPrecision", {
        /**
         * Gets or sets the precision to use when values are used for the auto callout labels.
        */
        get: function () {
            return this.i.n9;
        },
        set: function (v) {
            this.i.n9 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutTextColor", {
        /**
         * Gets or sets the color to use for the callout text. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.ql);
        },
        set: function (v) {
            this.i.ql = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutBackground", {
        /**
         * Gets or sets the brush that specifies how the backgrounds for the callouts of the layer are painted. Leave unset for an automatic value.
        */
        get: function () {
            return brushToString(this.i.qi);
        },
        set: function (v) {
            this.i.qi = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutInterpolatedValuePrecision", {
        /**
         * Gets or sets the precision to use displaying values for interpolated crosshair positions.
        */
        get: function () {
            return this.i.oa;
        },
        set: function (v) {
            this.i.oa = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutOutline", {
        /**
         * Gets or sets the brush that specifies how the outlines for the callouts of the layer are painted.
        */
        get: function () {
            return brushToString(this.i.qk);
        },
        set: function (v) {
            this.i.qk = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutLeaderBrush", {
        /**
         * Gets or sets the brush that specifies how the leader lines for the callouts of the layer are painted.
        */
        get: function () {
            return brushToString(this.i.qj);
        },
        set: function (v) {
            this.i.qj = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutPaddingLeft", {
        /**
         * Gets or sets the left padding to use withing the callout. Leaving this NaN will use an automatic value related to the axis label margins.
        */
        get: function () {
            return this.i.n2;
        },
        set: function (v) {
            this.i.n2 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutPaddingTop", {
        /**
         * Gets or sets the top padding to use within the callout. Leaving this NaN will use an automatic value related to the axis label margins.
        */
        get: function () {
            return this.i.n4;
        },
        set: function (v) {
            this.i.n4 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutPaddingRight", {
        /**
         * Gets or sets the right padding to use within the callout. Leaving this NaN will use an automatic value related to the axis label margins.
        */
        get: function () {
            return this.i.n3;
        },
        set: function (v) {
            this.i.n3 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutPaddingBottom", {
        /**
         * Gets or sets the bottom padding to use within the callout. Leaving this NaN will use an automatic value related to the axis label margins.
        */
        get: function () {
            return this.i.n1;
        },
        set: function (v) {
            this.i.n1 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutCollisionMode", {
        /**
         * Gets or sets the strategy to use for avoiding collisions between the callouts in this layer. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.mv;
        },
        set: function (v) {
            this.i.mv = ensureEnum(CalloutCollisionMode_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutPositionPadding", {
        /**
         * Gets or sets the padding to add to the callout positioning. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.n5;
        },
        set: function (v) {
            this.i.n5 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutStrokeThickness", {
        /**
         * Gets or sets the stroke thickness for the callout backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.n6;
        },
        set: function (v) {
            this.i.n6 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "textStyle", {
        /**
         * Gets or sets the stroke thickness for the axis annotation backing. Leave unset for an automatic value.
        */
        get: function () {
            return this.i.o6;
        },
        set: function (v) {
            this.i.o6 = v;
        },
        enumerable: true,
        configurable: true
    });
    /**
     * Invalidates content of callout layer
    
    */
    IgrCalloutLayer.prototype.invalidateCalloutContent = function () {
        this.i.pm();
    };
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutStyleUpdating", {
        /**
         * Event raised when updating style of callout layer
        */
        get: function () {
            return this._calloutStyleUpdating;
        },
        set: function (ev) {
            var _this = this;
            if (this._calloutStyleUpdating_wrapped !== null) {
                this.i.calloutStyleUpdating = delegateRemove(this.i.calloutStyleUpdating, this._calloutStyleUpdating_wrapped);
                this._calloutStyleUpdating_wrapped = null;
                this._calloutStyleUpdating = null;
            }
            this._calloutStyleUpdating = ev;
            this._calloutStyleUpdating_wrapped = function (o, e) {
                var outerArgs = new CalloutStyleUpdatingEventArgs();
                outerArgs._provideImplementation(e);
                if (_this.beforeCalloutStyleUpdating) {
                    _this.beforeCalloutStyleUpdating(_this, outerArgs);
                }
                if (_this._calloutStyleUpdating) {
                    _this._calloutStyleUpdating(_this, outerArgs);
                }
            };
            this.i.calloutStyleUpdating = delegateCombine(this.i.calloutStyleUpdating, this._calloutStyleUpdating_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutContentUpdating", {
        /**
         * Raised to allow you to decide on the content for an automatically created callout.
        */
        get: function () {
            return this._calloutContentUpdating;
        },
        set: function (ev) {
            var _this = this;
            if (this._calloutContentUpdating_wrapped !== null) {
                this.i.calloutContentUpdating = delegateRemove(this.i.calloutContentUpdating, this._calloutContentUpdating_wrapped);
                this._calloutContentUpdating_wrapped = null;
                this._calloutContentUpdating = null;
            }
            this._calloutContentUpdating = ev;
            this._calloutContentUpdating_wrapped = function (o, e) {
                var outerArgs = new CalloutContentUpdatingEventArgs();
                outerArgs._provideImplementation(e);
                if (_this.beforeCalloutContentUpdating) {
                    _this.beforeCalloutContentUpdating(_this, outerArgs);
                }
                if (_this._calloutContentUpdating) {
                    _this._calloutContentUpdating(_this, outerArgs);
                }
            };
            this.i.calloutContentUpdating = delegateCombine(this.i.calloutContentUpdating, this._calloutContentUpdating_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutLabelUpdating", {
        /**
         * Raised to allow you to decide on the label for an automatically created callout.
        */
        get: function () {
            return this._calloutLabelUpdating;
        },
        set: function (ev) {
            var _this = this;
            if (this._calloutLabelUpdating_wrapped !== null) {
                this.i.calloutLabelUpdating = delegateRemove(this.i.calloutLabelUpdating, this._calloutLabelUpdating_wrapped);
                this._calloutLabelUpdating_wrapped = null;
                this._calloutLabelUpdating = null;
            }
            this._calloutLabelUpdating = ev;
            this._calloutLabelUpdating_wrapped = function (o, e) {
                var outerArgs = new CalloutLabelUpdatingEventArgs();
                outerArgs._provideImplementation(e);
                if (_this.beforeCalloutLabelUpdating) {
                    _this.beforeCalloutLabelUpdating(_this, outerArgs);
                }
                if (_this._calloutLabelUpdating) {
                    _this._calloutLabelUpdating(_this, outerArgs);
                }
            };
            this.i.calloutLabelUpdating = delegateCombine(this.i.calloutLabelUpdating, this._calloutLabelUpdating_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCalloutLayer.prototype, "calloutSeriesSelecting", {
        /**
         * Raised to allow you to select a target series for a data bound callout.
        */
        get: function () {
            return this._calloutSeriesSelecting;
        },
        set: function (ev) {
            var _this = this;
            if (this._calloutSeriesSelecting_wrapped !== null) {
                this.i.calloutSeriesSelecting = delegateRemove(this.i.calloutSeriesSelecting, this._calloutSeriesSelecting_wrapped);
                this._calloutSeriesSelecting_wrapped = null;
                this._calloutSeriesSelecting = null;
            }
            this._calloutSeriesSelecting = ev;
            this._calloutSeriesSelecting_wrapped = function (o, e) {
                var outerArgs = new CalloutSeriesSelectingEventArgs();
                outerArgs._provideImplementation(e);
                if (_this.beforeCalloutSeriesSelecting) {
                    _this.beforeCalloutSeriesSelecting(_this, outerArgs);
                }
                if (_this._calloutSeriesSelecting) {
                    _this._calloutSeriesSelecting(_this, outerArgs);
                }
            };
            this.i.calloutSeriesSelecting = delegateCombine(this.i.calloutSeriesSelecting, this._calloutSeriesSelecting_wrapped);
        },
        enumerable: true,
        configurable: true
    });
    return IgrCalloutLayer;
}(IgrAnnotationLayer));
export { IgrCalloutLayer };
