/*
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";
import { NumericScaler } from "./NumericScaler";
import { enumGetBox, typeCast, markType, markDep } from "igniteui-react-core";
import { ArgumentNullException } from "igniteui-react-core";
import { LogarithmicScaler } from "./LogarithmicScaler";
import { PropertyMetadata } from "igniteui-react-core";
import { NumericAxisBaseView } from "./NumericAxisBaseView";
/**
 * @hidden
 */
export let StraightNumericAxisBase = /*@__PURE__*/ (() => {
    class StraightNumericAxisBase extends NumericAxisBase {
        constructor() {
            super();
            this.ln = null;
            this.lr = false;
            this.l1();
        }
        a3() {
            return new StraightNumericAxisBaseView(this);
        }
        gy(a) {
            super.gy(a);
            this.lq = a;
        }
        get lp() {
            return this.c(StraightNumericAxisBase.l3);
        }
        set lp(a) {
            this.h(StraightNumericAxisBase.l3, a);
        }
        static lz(a, b) {
            let c = typeCast(StraightNumericAxisBase.$, a);
            c.l1();
            c.g6("Scaler", b.oldValue, b.newValue);
        }
        lo() {
            return null;
        }
        get_lm() {
            if (this.ln == null) {
                this.l1();
            }
            return this.ln;
        }
        set_lm(a) {
            let b = this.ln != a;
            if (b) {
                let c = this.ln;
                this.ln = a;
                this.g6("ActualScaler", c, a);
            }
        }
        get lm() {
            return this.get_lm();
        }
        set lm(a) {
            this.set_lm(a);
        }
        k8(a, b, c, d, e, f, g) {
            let h = this.lm.t(a, b, c, f, g);
            f = h.p3;
            g = h.p4;
            return {
                p5: f,
                p6: g
            };
        }
        l0(a) {
            let b = this.lr;
            this.lr = true;
            a();
            this.lr = b;
        }
        l1() {
            let a = this.lp;
            if (a == null) {
                a = this.jr();
            }
            this.lm = a;
            if (this.lm == null) {
                throw new ArgumentNullException(0, "ActualScaler");
            }
            this.lw();
        }
        lw() {
            this.lq.bh();
        }
        g0(a, b, c, d) {
            if (this.lr) {
                return;
            }
            super.g0(a, b, c, d);
            switch (b) {
                case NumericAxisBase.$$p[2]:
                    this.l1();
                    break;
                case NumericAxisBase.$$p[1]:
                    this.l1();
                    break;
                case StraightNumericAxisBase.$$p[0]:
                    this.l1();
                    break;
                case "Scaler":
                    this.l1();
                    break;
                case "ActualScaler":
                    this.jy = typeCast(LogarithmicScaler.$, this.lm) !== null;
                    this.lw();
                    this.cn();
                    this.hc(false);
                    break;
                case "ActualMaximumValue":
                    this.lx();
                    break;
                case "ActualMinimumValue":
                    this.ly();
                    this.l1();
                    break;
            }
        }
        ly() {
            this.lm.y(this.kd);
        }
        lx() {
            this.lm.x(this.kc);
        }
        ls(a, b) {
            if (a < this.kd) {
                a = this.kd;
            }
            else if (a > this.kc) {
                a = this.kc;
            }
            if (!b.ch) {
                return (a - this.kd) / (this.kc - this.kd);
            }
            else {
                return (a - this.kc) / (this.kd - this.kc);
            }
        }
    }
    StraightNumericAxisBase.$t = /*@__PURE__*/ markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$);
    StraightNumericAxisBase.l3 = /*@__PURE__*/ DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, /*@__PURE__*/ new PropertyMetadata(2, null, StraightNumericAxisBase.lz));
    StraightNumericAxisBase.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'g6', ['ScaleMode:ll:l2', [NumericScaleMode_$type, /*@__PURE__*/ enumGetBox(NumericScaleMode_$type, 0)]]);
    return StraightNumericAxisBase;
})();
/**
 * @hidden
 */
export let StraightNumericAxisBaseView = /*@__PURE__*/ (() => {
    class StraightNumericAxisBaseView extends NumericAxisBaseView {
        constructor(a) {
            super(a);
            this.bg = null;
            this.bg = a;
        }
        bh() {
            this.bg.lm.x(this.bg.kc);
            this.bg.lm.y(this.bg.kd);
        }
    }
    StraightNumericAxisBaseView.$t = /*@__PURE__*/ markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$);
    return StraightNumericAxisBaseView;
})();
//# sourceMappingURL=StraightNumericAxisBase_combined.js.map
