/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { DataAnnotationShapeLayer } from "./DataAnnotationShapeLayer";
import { DependencyProperty } from "igniteui-angular-core";
import { typeCast, markType, markDep } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { DataAnnotationInfo } from "./DataAnnotationInfo";
import { IFastItemsSource_$type } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
/**
 * @hidden
 */
var DataAnnotationSliceLayer = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(DataAnnotationSliceLayer, _super);
    function DataAnnotationSliceLayer() {
        var _this = _super.call(this) || this;
        _this.afp = null;
        _this.afo = null;
        _this.ab = DataAnnotationSliceLayer.$;
        return _this;
    }
    DataAnnotationSliceLayer.prototype.bk = function () {
        return new DataAnnotationSliceLayer();
    };
    DataAnnotationSliceLayer.prototype.get_acz = function () {
        return false;
    };
    DataAnnotationSliceLayer.prototype.aek = function (a) {
        var _this = this;
        if (!this.acs(a)) {
            return;
        }
        var b = this.ac2._inner[a];
        b.c = new List$1(DataAnnotationInfo.$, 0);
        b.b = new List$1(DataAnnotationInfo.$, 0);
        b.centerLabelX = this.ado(a, this.afq);
        b.centerLabelY = this.ado(a, this.afq);
        var c = this.ac7(a, this.afr);
        if (this.acr) {
            b.shapeStartX = c;
            b.shapeStartY = Number.NEGATIVE_INFINITY;
            b.shapeEndX = c;
            b.shapeEndY = Number.POSITIVE_INFINITY;
            b.shapeCenterX = c;
            b.shapeCenterY = 0;
        }
        else {
            b.shapeStartX = Number.NEGATIVE_INFINITY;
            b.shapeStartY = c;
            b.shapeEndX = Number.POSITIVE_INFINITY;
            b.shapeEndY = c;
            b.shapeCenterX = 0;
            b.shapeCenterY = c;
        }
        b.b.add(((function () {
            var $ret = new DataAnnotationInfo();
            $ret.a = _this.acr ? _this.aaj : 6;
            $ret.b = !_this.acr ? _this.aaj : 6;
            $ret.dataValueX = c;
            $ret.dataValueY = c;
            $ret.dataLabelX = b.centerLabelX;
            $ret.dataLabelY = b.centerLabelY;
            $ret.j = b.z.x;
            $ret.k = b.z.y;
            return $ret;
        })()));
        b.c.add(((function () {
            var $ret = new DataAnnotationInfo();
            $ret.j = b.ab.x;
            $ret.k = b.ab.y;
            return $ret;
        })()));
        b.c.add(((function () {
            var $ret = new DataAnnotationInfo();
            $ret.j = b.aa.x;
            $ret.k = b.aa.y;
            return $ret;
        })()));
    };
    DataAnnotationSliceLayer.prototype.rg = function (a, b, c, d) {
        _super.prototype.rg.call(this, a, b, c, d);
        switch (b) {
            case "AnnotationValueColumn":
            case "AnnotationLabelColumn":
                this.abj();
                break;
            case DataAnnotationSliceLayer.$$p[1]:
                if (this.dp != null) {
                    this.dp.deregisterColumn(this.afr);
                    this.afr = this.dl(this.afw);
                }
                break;
            case DataAnnotationSliceLayer.$$p[0]:
                if (this.dp != null) {
                    this.dp.deregisterColumn(this.afq);
                    this.afq = this.dn(this.aft);
                }
                break;
        }
    };
    DataAnnotationSliceLayer.prototype.aem = function (a, b) {
        _super.prototype.aem.call(this, a, b);
        if (typeCast(IFastItemsSource_$type, a) != null) {
            a.deregisterColumn(this.afq);
            a.deregisterColumn(this.afr);
            this.afq = null;
            this.afr = null;
        }
        if (typeCast(IFastItemsSource_$type, b) != null) {
            this.afr = this.dl(this.afw);
            this.afq = this.dn(this.aft);
        }
    };
    Object.defineProperty(DataAnnotationSliceLayer.prototype, "afr", {
        get: function () {
            return this.afp;
        },
        set: function (a) {
            if (this.afp != a) {
                var b = this.afp;
                this.afp = a;
                this.raisePropertyChanged("AnnotationValueColumn", b, this.afp);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(DataAnnotationSliceLayer.prototype, "afq", {
        get: function () {
            return this.afo;
        },
        set: function (a) {
            if (this.afo != a) {
                var b = this.afo;
                this.afo = a;
                this.raisePropertyChanged("AnnotationLabelColumn", b, this.afo);
            }
        },
        enumerable: false,
        configurable: true
    });
    DataAnnotationSliceLayer.$t = markType(DataAnnotationSliceLayer, 'DataAnnotationSliceLayer', DataAnnotationShapeLayer.$);
    DataAnnotationSliceLayer.$$p = markDep(DependencyProperty, PropertyMetadata, DataAnnotationSliceLayer, 'raisePropertyChanged', ['AnnotationLabelMemberPath:aft:afy', [2, null], 'AnnotationValueMemberPath:afw:afz', [2, null]]);
    return DataAnnotationSliceLayer;
}(DataAnnotationShapeLayer));
export { DataAnnotationSliceLayer };
