/*
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 { Frame } from "./Frame";
import { List$1 } from "igniteui-react-core/ES2015/List$1";
import { Brush } from "igniteui-react-core/ES2015/Brush";
import { Axis } from "./Axis";
import { FrameExtended } from "./FrameExtended";
import { Number_$type, markType } from "igniteui-react-core/ES2015/type";
/**
 * @hidden
 */
export class AxisAnnotationFrame extends Frame {
    constructor() {
        super();
        this.n = null;
        this.h = null;
        this.g = null;
        this.m = null;
        this.j = null;
        this.l = null;
        this.k = null;
        this.i = null;
        this.y = null;
        this.s = null;
        this.r = null;
        this.x = null;
        this.u = null;
        this.w = null;
        this.v = null;
        this.t = null;
        this.p = null;
        this.aa = null;
        this.o = null;
        this.z = null;
        this.f = null;
        this.q = null;
        this.n = new List$1(Brush.$, 0);
        this.g = new List$1(Brush.$, 0);
        this.h = new List$1(Brush.$, 0);
        this.j = new List$1(Number_$type, 0);
        this.k = new List$1(Number_$type, 0);
        this.l = new List$1(Number_$type, 0);
        this.i = new List$1(Number_$type, 0);
        this.m = new List$1(Number_$type, 0);
        this.y = new List$1(Brush.$, 0);
        this.r = new List$1(Brush.$, 0);
        this.s = new List$1(Brush.$, 0);
        this.u = new List$1(Number_$type, 0);
        this.v = new List$1(Number_$type, 0);
        this.w = new List$1(Number_$type, 0);
        this.t = new List$1(Number_$type, 0);
        this.x = new List$1(Number_$type, 0);
        this.f = new List$1(Axis.$, 0);
        this.q = new List$1(Axis.$, 0);
        this.p = new List$1(Number_$type, 0);
        this.o = new List$1(Number_$type, 0);
        this.aa = new List$1(Number_$type, 0);
        this.z = new List$1(Number_$type, 0);
    }
    static ab(a, b, c, d) {
        let e = c.count;
        let f = d.count;
        let g = Math.max(e, f);
        let h = 1 - b;
        if (a.count < g) {
            let i = new Array(g - a.count);
            for (let j = 0; j < g - a.count; j++) {
                i[j] = null;
            }
            a.s(a.count, i);
        }
        if (a.count > g) {
            a.v(g, a.count - g);
        }
        for (let k = 0; k < Math.min(e, f); ++k) {
            if (b == 0) {
                a._inner[k] = c._inner[k];
            }
            else {
                a._inner[k] = d._inner[k];
            }
        }
        if (e < f) {
            let l = e > 0 ? c._inner[e - 1] : null;
            for (let m = e; m < f; ++m) {
                if (b == 0) {
                    a._inner[m] = l;
                }
                else {
                    a._inner[m] = d._inner[m];
                }
            }
        }
        if (e > f) {
            let n = f > 0 ? d._inner[f - 1] : null;
            for (let o = f; o < e; ++o) {
                if (b == 0) {
                    a._inner[o] = c._inner[o];
                }
                else {
                    a._inner[o] = n;
                }
            }
        }
    }
    c(a, b, c) {
        let d = b;
        let e = c;
        FrameExtended.a(this.n, a, d.n, e.n, 0);
        FrameExtended.a(this.g, a, d.g, e.g, 0);
        FrameExtended.a(this.h, a, d.h, e.h, 0);
        Frame.b(this.j, a, d.j, e.j);
        Frame.b(this.k, a, d.k, e.k);
        Frame.b(this.l, a, d.l, e.l);
        Frame.b(this.i, a, d.i, e.i);
        Frame.b(this.m, a, d.m, e.m);
        FrameExtended.a(this.y, a, d.y, e.y, 0);
        FrameExtended.a(this.r, a, d.r, e.r, 0);
        FrameExtended.a(this.s, a, d.s, e.s, 0);
        Frame.b(this.u, a, d.u, e.u);
        Frame.b(this.v, a, d.v, e.v);
        Frame.b(this.w, a, d.w, e.w);
        Frame.b(this.t, a, d.t, e.t);
        Frame.b(this.x, a, d.x, e.x);
        AxisAnnotationFrame.ab(this.f, a, d.f, e.f);
        AxisAnnotationFrame.ab(this.q, a, d.q, e.q);
    }
}
AxisAnnotationFrame.$t = markType(AxisAnnotationFrame, 'AxisAnnotationFrame', Frame.$);
