import { IgxSeriesComponent } from "./igx-series-component";
import { ensureBool, fromPoint } from "igniteui-angular-core";
/**
 * Provides data for IgxDataChartComponent mouse button related events.
*
* `DataChartMouseButtonEventHandler` class represents the method that will handle IgxDataChartComponent mouse button related events.
*
* ```html
*  <igx-data-chart  #chart
*       [dataSource]="data"
* 	  (seriesMouseLeftButtonDown)="chart_seriesMouseLeftButtonDown()">
*       <igx-category-x-axis
*         label="label"
*         #xAxis
*         >
*       </igx-category-x-axis>
*       <igx-numeric-y-axis
*         minimumValue="0"
*         #yAxis>
*       </igx-numeric-y-axis>
*
*       <igx-column-series
*         [xAxis]="xAxis"
*         [yAxis]="yAxis"
*         valueMemberPath="value">
*       </igx-column-series>
*     </igx-data-chart>
* ```
*
* ```ts
* this.chart.seriesMouseLeftButtonDown.subscribe(this.chart_seriesMouseLeftButtonDown);
* chart_seriesMouseLeftButtonDown(sender :any,args: DataChartMouseButtonEventArgs )
*   {
*   }
* ```
*/
var IgxDataChartMouseButtonEventArgs = /** @class */ /*@__PURE__*/ (function () {
    function IgxDataChartMouseButtonEventArgs() {
    }
    Object.defineProperty(IgxDataChartMouseButtonEventArgs.prototype, "i", {
        /**
         * @hidden
         */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    IgxDataChartMouseButtonEventArgs.prototype.onImplementationCreated = function () {
    };
    IgxDataChartMouseButtonEventArgs.prototype._provideImplementation = function (i) {
        this._implementation = i;
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    };
    Object.defineProperty(IgxDataChartMouseButtonEventArgs.prototype, "handled", {
        /**
         * Gets or sets a value that indicates the present state of the event handling for a routed
         * event as it travels the route.
         * ChartMouseButton events are not routed events; setting this property effects the underlying
         * MouseButtonEvent.
        *
        * Use the `handled` property to indicates the present state of the event handling for a routed event.
        */
        get: function () {
            return this.i.handled;
        },
        set: function (v) {
            this.i.handled = ensureBool(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataChartMouseButtonEventArgs.prototype, "originalSource", {
        /**
         * Gets a reference to the object that raised the event.
        *
        * Use the `originalSource` property for the raised object event.
        *
        * ```ts
        * args.originalSource;
        * ```
        */
        get: function () {
            return this.i.originalSource;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataChartMouseButtonEventArgs.prototype, "item", {
        /**
         * Gets the ItemsSource item associated with the current event.
        *
        * Use the `item` property to get the ItemsSource item associated with the current event.
        *
        * ```ts
        * var item1= args.item;
        * ```
        */
        get: function () {
            return this.i.item;
        },
        set: function (v) {
            this.i.item = v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataChartMouseButtonEventArgs.prototype, "series", {
        /**
         * Gets the series associated with the current event.
        *
        * Use the `series` property for the associated current event.
        *
        * ```ts
        *  var DataSeries= args.series;
        * ```
        */
        get: function () {
            if (this.i.series == null) {
                return null;
            }
            if (!this.i.series.externalObject) {
                var e = IgxSeriesComponent._createFromInternal(this.i.series);
                if (e) {
                    e._implementation = this.i.series;
                }
                this.i.series.externalObject = e;
            }
            return this.i.series.externalObject;
        },
        set: function (v) {
            v == null ? this.i.series = null : this.i.series = v.i;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgxDataChartMouseButtonEventArgs.prototype, "chart", {
        /**
         * Gets the Chart associated with the current event.
        *
        * Use the `chart` property to get the chart associated with the current event.
        *
        * ```ts
        * var dataChart=  args.chart;
        * ```
        */
        get: function () {
            if (this.i.chart == null) {
                return null;
            }
            return this.i.chart.externalObject;
        },
        set: function (v) {
            v == null ? this.i.chart = null : this.i.chart = v.i;
        },
        enumerable: false,
        configurable: true
    });
    /**
     * Provides a human readable description of the mouse button event.
    
    *
    * Use the `toString` property to provides a human readable discription.
    *
    * ```ts
    *   var item= args.item.label.toString();
    * ```
    */
    IgxDataChartMouseButtonEventArgs.prototype.toString = function () {
        var iv = this.i.toString();
        return (iv);
    };
    /**
     * Returns the x- and y- coordinates of the mouse pointer position, optionally evaluated
     * against the origin of a supplied UIElement.
    
    * @param relativeTo  * Any UIElement derived object that is contained by the the engine plug-in
     * and connected to the object tree. To specify the object relative to the overall the engine
     * coordinate system, use a relativeTo value of null.
    *
    * To get mouse X and Y position.
    *
    * ```ts
    *    var args.getPosition;
    * ```
    */
    IgxDataChartMouseButtonEventArgs.prototype.getPosition = function (relativeTo) {
        var iv = this.i.getPosition(relativeTo);
        return fromPoint(iv);
    };
    return IgxDataChartMouseButtonEventArgs;
}());
export { IgxDataChartMouseButtonEventArgs };
