var __decorate = this && this.__decorate || function(decorators, target, key, desc) {
    var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};

import { injectable } from "./../../../vrender";

import { CHART_NUMBER_TYPE } from "../chart";

let VChartPicker = class {
    constructor() {
        this.type = "chart", this.numberType = CHART_NUMBER_TYPE;
    }
    contains(chart, point, params) {
        var _a;
        if (chart.attribute.detectPickChartItem) {
            const vChart = chart.activeChartInstance;
            if (!vChart) return !1;
            const vchartStage = vChart.getStage();
            null === (_a = vchartStage.dirtyBounds) || void 0 === _a || _a.clear();
            const pick = vchartStage.pick(point.x, point.y);
            return (null !== pick.graphic || "root" !== pick.group.name) && pick;
        }
        return !!chart.AABBBounds.containsPoint(point);
    }
};

VChartPicker = __decorate([ injectable() ], VChartPicker);

export { VChartPicker };
//# sourceMappingURL=vchart-graphic-picker.js.map
