/*
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 { 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
 */
export let DataAnnotationSliceLayer = /*@__PURE__*/ (() => {
    class DataAnnotationSliceLayer extends DataAnnotationShapeLayer {
        constructor() {
            super();
            this.afp = null;
            this.afo = null;
            this.ab = DataAnnotationSliceLayer.$;
        }
        bk() {
            return new DataAnnotationSliceLayer();
        }
        get_acz() {
            return false;
        }
        aek(a) {
            if (!this.acs(a)) {
                return;
            }
            let 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);
            let 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(((() => {
                let $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(((() => {
                let $ret = new DataAnnotationInfo();
                $ret.j = b.ab.x;
                $ret.k = b.ab.y;
                return $ret;
            })()));
            b.c.add(((() => {
                let $ret = new DataAnnotationInfo();
                $ret.j = b.aa.x;
                $ret.k = b.aa.y;
                return $ret;
            })()));
        }
        rg(a, b, c, d) {
            super.rg(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;
            }
        }
        aem(a, b) {
            super.aem(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);
            }
        }
        get afr() {
            return this.afp;
        }
        set afr(a) {
            if (this.afp != a) {
                let b = this.afp;
                this.afp = a;
                this.raisePropertyChanged("AnnotationValueColumn", b, this.afp);
            }
        }
        get afq() {
            return this.afo;
        }
        set afq(a) {
            if (this.afo != a) {
                let b = this.afo;
                this.afo = a;
                this.raisePropertyChanged("AnnotationLabelColumn", b, this.afo);
            }
        }
    }
    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;
})();
