/*
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 { DataAnnotationPointLayer } from "./DataAnnotationPointLayer";
import { markType } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { DataAnnotationInfo } from "./DataAnnotationInfo";
import { isNaN_ } from "igniteui-angular-core";
import { stringIsNullOrEmpty } from "igniteui-angular-core";
/**
 * @hidden
 */
export let DataAnnotationLineLayer = /*@__PURE__*/ (() => {
    class DataAnnotationLineLayer extends DataAnnotationPointLayer {
        constructor() {
            super();
            this.ab = DataAnnotationLineLayer.$;
        }
        bk() {
            return new DataAnnotationLineLayer();
        }
        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.agv);
            b.centerLabelY = this.ado(a, this.agw);
            b.startLabelX = this.ado(a, this.ag1);
            b.startLabelY = this.ado(a, this.ag2);
            b.endLabelX = this.ado(a, this.agx);
            b.endLabelY = this.ado(a, this.agy);
            b.shapeStartX = this.ac7(a, this.ag3);
            b.shapeStartY = this.ac7(a, this.ag4);
            b.shapeEndX = this.ac7(a, this.agz);
            b.shapeEndY = this.ac7(a, this.ag0);
            if (isNaN_(b.shapeStartX)) {
                b.shapeStartX = b.shapeEndX;
            }
            if (isNaN_(b.shapeStartY)) {
                b.shapeStartY = b.shapeEndY;
            }
            if (isNaN_(b.shapeEndX)) {
                b.shapeEndX = b.shapeStartX;
            }
            if (isNaN_(b.shapeEndY)) {
                b.shapeEndY = b.shapeStartY;
            }
            b.shapeCenterX = b.shapeStartX + ((b.shapeEndX - b.shapeStartX) / 2);
            b.shapeCenterY = b.shapeStartY + ((b.shapeEndY - b.shapeStartY) / 2);
            b.c.add(((() => {
                let $ret = new DataAnnotationInfo();
                $ret.textColor = this.age;
                $ret.background = this.agc;
                $ret.borderColor = this.agd;
                $ret.j = b.ab.x;
                $ret.k = b.ab.y;
                $ret.dataLabelX = b.startLabelX;
                $ret.dataLabelY = b.startLabelY;
                $ret.dataValueX = b.ab.x;
                $ret.dataValueY = b.ab.y;
                $ret.a = this.agj;
                $ret.b = this.agk;
                return $ret;
            })()));
            b.c.add(((() => {
                let $ret = new DataAnnotationInfo();
                $ret.textColor = this.agb;
                $ret.background = this.af9;
                $ret.borderColor = this.aga;
                $ret.j = b.aa.x;
                $ret.k = b.aa.y;
                $ret.dataLabelX = b.endLabelX;
                $ret.dataLabelY = b.endLabelY;
                $ret.dataValueX = b.aa.x;
                $ret.dataValueY = b.aa.y;
                $ret.a = this.agh;
                $ret.b = this.agi;
                return $ret;
            })()));
            let c = this.agf;
            if (c == 0) {
                if (stringIsNullOrEmpty(b.centerLabelX)) {
                    c = 6;
                }
            }
            let d = this.agg;
            if (d == 0) {
                if (stringIsNullOrEmpty(b.centerLabelY)) {
                    d = 6;
                }
            }
            b.b.add(((() => {
                let $ret = new DataAnnotationInfo();
                $ret.textColor = this.af8;
                $ret.background = this.af6;
                $ret.borderColor = this.af7;
                $ret.j = b.z.x;
                $ret.k = b.z.y;
                $ret.dataLabelX = b.centerLabelX;
                $ret.dataLabelY = b.centerLabelY;
                $ret.dataValueX = b.z.x;
                $ret.dataValueY = b.z.y;
                $ret.a = c;
                $ret.b = d;
                return $ret;
            })()));
        }
    }
    DataAnnotationLineLayer.$t = markType(DataAnnotationLineLayer, 'DataAnnotationLineLayer', DataAnnotationPointLayer.$);
    return DataAnnotationLineLayer;
})();
