/*
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/ES2015/DependencyProperty";
import { NumericScaler } from "./NumericScaler";
import { Type, enumGetBox, typeCast, markType } from "igniteui-angular-core/ES2015/type";
import { ArgumentNullException } from "igniteui-angular-core/ES2015/ArgumentNullException";
import { LogarithmicScaler } from "./LogarithmicScaler";
import { PropertyMetadata } from "igniteui-angular-core/ES2015/PropertyMetadata";
import { NumericAxisBaseView } from "./NumericAxisBaseView";
/**
 * @hidden
 */
export class StraightNumericAxisBase extends NumericAxisBase {
    constructor() {
        super();
        this.ld = null;
        this.lh = false;
        this.lr();
    }
    a1() {
        return new StraightNumericAxisBaseView(this);
    }
    gr(a) {
        super.gr(a);
        this.lg = a;
    }
    get lf() {
        return this.c(StraightNumericAxisBase.lt);
    }
    set lf(a) {
        this.h(StraightNumericAxisBase.lt, a);
    }
    static lp(a, b) {
        let c = typeCast(StraightNumericAxisBase.$, a);
        c.lr();
        c.gz("Scaler", b.oldValue, b.newValue);
    }
    le() {
        return null;
    }
    get_lc() {
        if (this.ld == null) {
            this.lr();
        }
        return this.ld;
    }
    set_lc(a) {
        let b = this.ld != a;
        if (b) {
            let c = this.ld;
            this.ld = a;
            this.gz("ActualScaler", c, a);
        }
    }
    get lc() {
        return this.get_lc();
    }
    set lc(a) {
        this.set_lc(a);
    }
    ky(a, b, c, d, e, f, g) {
        let h = this.lc.t(a, b, c, f, g);
        f = h.p3;
        g = h.p4;
        return {
            p5: f,
            p6: g
        };
    }
    lq(a) {
        let b = this.lh;
        this.lh = true;
        a();
        this.lh = b;
    }
    lr() {
        let a = this.lf;
        if (a == null) {
            a = this.jh();
        }
        this.lc = a;
        if (this.lc == null) {
            throw new ArgumentNullException(0, "ActualScaler");
        }
        this.lm();
    }
    lm() {
        this.lg.bh();
    }
    gt(a, b, c, d) {
        if (this.lh) {
            return;
        }
        super.gt(a, b, c, d);
        switch (b) {
            case NumericAxisBase.$$p[2]:
                this.lr();
                break;
            case NumericAxisBase.$$p[1]:
                this.lr();
                break;
            case StraightNumericAxisBase.$$p[0]:
                this.lr();
                break;
            case "Scaler":
                this.lr();
                break;
            case "ActualScaler":
                this.jo = typeCast(LogarithmicScaler.$, this.lc) !== null;
                this.lm();
                this.ck();
                this.g5(false);
                break;
            case "ActualMaximumValue":
                this.ln();
                break;
            case "ActualMinimumValue":
                this.lo();
                this.lr();
                break;
        }
    }
    lo() {
        this.lc.y(this.j3);
    }
    ln() {
        this.lc.x(this.j2);
    }
    li(a, b) {
        if (a < this.j3) {
            a = this.j3;
        }
        else if (a > this.j2) {
            a = this.j2;
        }
        if (!b.ce) {
            return (a - this.j3) / (this.j2 - this.j3);
        }
        else {
            return (a - this.j2) / (this.j3 - this.j2);
        }
    }
}
StraightNumericAxisBase.$t = markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$);
StraightNumericAxisBase.lt = DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, new PropertyMetadata(2, null, StraightNumericAxisBase.lp));
Type.dep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'gz', ['ScaleMode:lb:ls', [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.lc.x(this.bg.j2);
        this.bg.lc.y(this.bg.j3);
    }
}
StraightNumericAxisBaseView.$t = markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$);
//# sourceMappingURL=StraightNumericAxisBase_combined.js.map