/*
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 { Base, toNullable, Number_$type, markType } from "igniteui-angular-core";
import { CultureInfo } from "igniteui-angular-core";
import { stringEquals1 } from "igniteui-angular-core";
import { tryParseNumber } from "igniteui-angular-core";
import { numberToString } from "igniteui-angular-core";
/**
 * @hidden
 */
export let DoubleOrAutoBase = /*@__PURE__*/ (() => {
    class DoubleOrAutoBase extends Base {
        constructor() {
            super();
            this.b = toNullable(Number_$type, null);
        }
        get a() {
            return this.b.hasValue == false;
        }
        static e(a, b) {
            b = toNullable(Number_$type, null);
            if (stringEquals1(a, "auto", 3) == false) {
                let c;
                if (((() => { let d = tryParseNumber(a, c); c = d.p1; return d.ret; })())) {
                    b = toNullable(Number_$type, c);
                }
            }
            return {
                p1: b
            };
        }
        d() {
            return this.b.hasValue ? numberToString(this.b.value, CultureInfo.invariantCulture) : "auto";
        }
    }
    DoubleOrAutoBase.$t = markType(DoubleOrAutoBase, 'DoubleOrAutoBase');
    return DoubleOrAutoBase;
})();
