/*
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 { NumericAxisBase } from "./NumericAxisBase";
import { NumericScaleMode_$type } from "./NumericScaleMode";
import { DependencyProperty } from "igniteui-angular-core";
import { NumericScaler } from "./NumericScaler";
import { enumGetBox, typeCast, markType, markDep } from "igniteui-angular-core";
import { ArgumentNullException } from "igniteui-angular-core";
import { LogarithmicScaler } from "./LogarithmicScaler";
import { PropertyMetadata } from "igniteui-angular-core";
import { NumericAxisBaseView } from "./NumericAxisBaseView";
/**
 * @hidden
 */
export class StraightNumericAxisBase extends NumericAxisBase {
    constructor() {
        super();
        this.le = null;
        this.li = false;
        this.ls();
    }
    a1() {
        return new StraightNumericAxisBaseView(this);
    }
    gs(a) {
        super.gs(a);
        this.lh = a;
    }
    get lg() {
        return this.c(StraightNumericAxisBase.lu);
    }
    set lg(a) {
        this.h(StraightNumericAxisBase.lu, a);
    }
    static lq(a, b) {
        let c = typeCast(StraightNumericAxisBase.$, a);
        c.ls();
        c.g0("Scaler", b.oldValue, b.newValue);
    }
    lf() {
        return null;
    }
    get_ld() {
        if (this.le == null) {
            this.ls();
        }
        return this.le;
    }
    set_ld(a) {
        let b = this.le != a;
        if (b) {
            let c = this.le;
            this.le = a;
            this.g0("ActualScaler", c, a);
        }
    }
    get ld() {
        return this.get_ld();
    }
    set ld(a) {
        this.set_ld(a);
    }
    kz(a, b, c, d, e, f, g) {
        let h = this.ld.t(a, b, c, f, g);
        f = h.p3;
        g = h.p4;
        return {
            p5: f,
            p6: g
        };
    }
    lr(a) {
        let b = this.li;
        this.li = true;
        a();
        this.li = b;
    }
    ls() {
        let a = this.lg;
        if (a == null) {
            a = this.ji();
        }
        this.ld = a;
        if (this.ld == null) {
            throw new ArgumentNullException(0, "ActualScaler");
        }
        this.ln();
    }
    ln() {
        this.lh.bh();
    }
    gu(a, b, c, d) {
        if (this.li) {
            return;
        }
        super.gu(a, b, c, d);
        switch (b) {
            case NumericAxisBase.$$p[2]:
                this.ls();
                break;
            case NumericAxisBase.$$p[1]:
                this.ls();
                break;
            case StraightNumericAxisBase.$$p[0]:
                this.ls();
                break;
            case "Scaler":
                this.ls();
                break;
            case "ActualScaler":
                this.jp = typeCast(LogarithmicScaler.$, this.ld) !== null;
                this.ln();
                this.cl();
                this.g6(false);
                break;
            case "ActualMaximumValue":
                this.lo();
                break;
            case "ActualMinimumValue":
                this.lp();
                this.ls();
                break;
        }
    }
    lp() {
        this.ld.y(this.j4);
    }
    lo() {
        this.ld.x(this.j3);
    }
    lj(a, b) {
        if (a < this.j4) {
            a = this.j4;
        }
        else if (a > this.j3) {
            a = this.j3;
        }
        if (!b.cf) {
            return (a - this.j4) / (this.j3 - this.j4);
        }
        else {
            return (a - this.j3) / (this.j4 - this.j3);
        }
    }
}
StraightNumericAxisBase.$t = markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$);
StraightNumericAxisBase.lu = DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, new PropertyMetadata(2, null, StraightNumericAxisBase.lq));
StraightNumericAxisBase.$$p = markDep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'g0', ['ScaleMode:lc:lt', [NumericScaleMode_$type, enumGetBox(NumericScaleMode_$type, 0)]]);
/**
 * @hidden
 */
export class StraightNumericAxisBaseView extends NumericAxisBaseView {
    constructor(a) {
        super(a);
        this.bg = null;
        this.bg = a;
    }
    bh() {
        this.bg.ld.x(this.bg.j3);
        this.bg.ld.y(this.bg.j4);
    }
}
StraightNumericAxisBaseView.$t = markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$);
//# sourceMappingURL=StraightNumericAxisBase_combined.js.map