/*
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.lm = null;
            this.lq = false;
            this.l0();
        }
        a3() {
            return new StraightNumericAxisBaseView(this);
        }
        gx(a) {
            super.gx(a);
            this.lp = a;
        }
        get lo() {
            return this.c(StraightNumericAxisBase.l2);
        }
        set lo(a) {
            this.h(StraightNumericAxisBase.l2, a);
        }
        static ly(a, b) {
            let c = typeCast(StraightNumericAxisBase.$, a);
            c.l0();
            c.g5("Scaler", b.oldValue, b.newValue);
        }
        ln() {
            return null;
        }
        get_ll() {
            if (this.lm == null) {
                this.l0();
            }
            return this.lm;
        }
        set_ll(a) {
            let b = this.lm != a;
            if (b) {
                let c = this.lm;
                this.lm = a;
                this.g5("ActualScaler", c, a);
            }
        }
        get ll() {
            return this.get_ll();
        }
        set ll(a) {
            this.set_ll(a);
        }
        k7(a, b, c, d, e, f, g) {
            let h = this.ll.t(a, b, c, f, g);
            f = h.p3;
            g = h.p4;
            return {
                p5: f,
                p6: g
            };
        }
        lz(a) {
            let b = this.lq;
            this.lq = true;
            a();
            this.lq = b;
        }
        l0() {
            let a = this.lo;
            if (a == null) {
                a = this.jq();
            }
            this.ll = a;
            if (this.ll == null) {
                throw new ArgumentNullException(0, "ActualScaler");
            }
            this.lv();
        }
        lv() {
            this.lp.bh();
        }
        gz(a, b, c, d) {
            if (this.lq) {
                return;
            }
            super.gz(a, b, c, d);
            switch (b) {
                case NumericAxisBase.$$p[2]:
                    this.l0();
                    break;
                case NumericAxisBase.$$p[1]:
                    this.l0();
                    break;
                case StraightNumericAxisBase.$$p[0]:
                    this.l0();
                    break;
                case "Scaler":
                    this.l0();
                    break;
                case "ActualScaler":
                    this.jx = typeCast(LogarithmicScaler.$, this.ll) !== null;
                    this.lv();
                    this.cn();
                    this.hb(false);
                    break;
                case "ActualMaximumValue":
                    this.lw();
                    break;
                case "ActualMinimumValue":
                    this.lx();
                    this.l0();
                    break;
            }
        }
        lx() {
            this.ll.y(this.kc);
        }
        lw() {
            this.ll.x(this.kb);
        }
        lr(a, b) {
            if (a < this.kc) {
                a = this.kc;
            }
            else if (a > this.kb) {
                a = this.kb;
            }
            if (!b.ch) {
                return (a - this.kc) / (this.kb - this.kc);
            }
            else {
                return (a - this.kb) / (this.kc - this.kb);
            }
        }
    }
    StraightNumericAxisBase.$t = /*@__PURE__*/ markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$);
    StraightNumericAxisBase.l2 = /*@__PURE__*/ DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, /*@__PURE__*/ new PropertyMetadata(2, null, StraightNumericAxisBase.ly));
    StraightNumericAxisBase.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'g5', ['ScaleMode:lk:l1', [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.ll.x(this.bg.kb);
            this.bg.ll.y(this.bg.kc);
        }
    }
    StraightNumericAxisBaseView.$t = /*@__PURE__*/ markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$);
    return StraightNumericAxisBaseView;
})();
//# sourceMappingURL=StraightNumericAxisBase_combined.js.map
