/*
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-react-core/ES2015/DependencyProperty";
import { NumericScaler } from "./NumericScaler";
import { ArgumentNullException } from "igniteui-react-core/ES2015/ArgumentNullException";
import { LogarithmicScaler } from "./LogarithmicScaler";
import { Type, enumGetBox, typeCast, markType } from "igniteui-react-core/ES2015/type";
import { PropertyMetadata } from "igniteui-react-core/ES2015/PropertyMetadata";
import { NumericAxisBaseView } from "./NumericAxisBaseView";
export class StraightNumericAxisBase extends NumericAxisBase {
    constructor() {
        super();
        this.k6 = null;
        this.la = false;
        this.lk();
    }
    a1() {
        return new StraightNumericAxisBaseView(this);
    }
    gl(a) {
        super.gl(a);
        this.k9 = a;
    }
    get k8() {
        return this.c(StraightNumericAxisBase.lm);
    }
    set k8(a) {
        this.h(StraightNumericAxisBase.lm, a);
    }
    static li(a, b) {
        let c = typeCast(StraightNumericAxisBase.$, a);
        c.lk();
        c.gt("Scaler", b.oldValue, b.newValue);
    }
    k7() {
        return null;
    }
    get_k5() {
        if (this.k6 == null) {
            this.lk();
        }
        return this.k6;
    }
    set_k5(a) {
        let b = this.k6 != a;
        if (b) {
            let c = this.k6;
            this.k6 = a;
            this.gt("ActualScaler", c, a);
        }
    }
    get k5() {
        return this.get_k5();
    }
    set k5(a) {
        this.set_k5(a);
    }
    kr(a, b, c, d, e, f, g) {
        let h = this.k5.t(a, b, c, f, g);
        f = h.p3;
        g = h.p4;
        return {
            p5: f,
            p6: g
        };
    }
    lj(a) {
        let b = this.la;
        this.la = true;
        a();
        this.la = b;
    }
    lk() {
        let a = this.k8;
        if (a == null) {
            a = this.ja();
        }
        this.k5 = a;
        if (this.k5 == null) {
            throw new ArgumentNullException(0, "ActualScaler");
        }
        this.lf();
    }
    lf() {
        this.k9.bg();
    }
    gn(a, b, c, d) {
        if (this.la) {
            return;
        }
        super.gn(a, b, c, d);
        switch (b) {
            case NumericAxisBase.$$p[2]:
                this.lk();
                break;
            case NumericAxisBase.$$p[1]:
                this.lk();
                break;
            case StraightNumericAxisBase.$$p[0]:
                this.lk();
                break;
            case "Scaler":
                this.lk();
                break;
            case "ActualScaler":
                this.jh = typeCast(LogarithmicScaler.$, this.k5) !== null;
                this.lf();
                this.ck();
                this.gz(false);
                break;
            case "ActualMaximumValue":
                this.lg();
                break;
            case "ActualMinimumValue":
                this.lh();
                this.lk();
                break;
        }
    }
    lh() {
        this.k5.y(this.jw);
    }
    lg() {
        this.k5.x(this.jv);
    }
    lb(a, b) {
        if (a < this.jw) {
            a = this.jw;
        }
        else if (a > this.jv) {
            a = this.jv;
        }
        if (!b.ce) {
            return (a - this.jw) / (this.jv - this.jw);
        }
        else {
            return (a - this.jv) / (this.jw - this.jv);
        }
    }
}
StraightNumericAxisBase.lm = DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, new PropertyMetadata(2, null, StraightNumericAxisBase.li));
StraightNumericAxisBase.$t = markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$);
Type.dep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'gt', ['ScaleMode:k4:ll', [NumericScaleMode_$type, enumGetBox(NumericScaleMode_$type, 0)]]);
export class StraightNumericAxisBaseView extends NumericAxisBaseView {
    constructor(a) {
        super(a);
        this.bf = null;
        this.bf = a;
    }
    bg() {
        this.bf.k5.x(this.bf.jv);
        this.bf.k5.y(this.bf.jw);
    }
}
StraightNumericAxisBaseView.$t = markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$);
/*<BeginStatics Name="Infragistics.Controls.Charts.StraightNumericAxisBase" />*/
/*<EndStatics Name="Infragistics.Controls.Charts.StraightNumericAxisBase" />*/
