/*
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, markType } from "igniteui-react-core/ES2015/type";
import { truncate, log10 } from "igniteui-react-core/ES2015/number";
/**
 * @hidden
 */
export class Snapper extends Base {
    constructor() {
        super(...arguments);
        this.c = 7;
        this.a = false;
    }
    get f() {
        return this.c;
    }
    set f(a) {
        this.c = a;
    }
    get b() {
        return this.a;
    }
    set b(a) {
        this.a = a;
    }
    static d(a, b) {
        let c = 1;
        if (b > 0) {
            for (; b > 0; --b) {
                c *= a;
            }
        }
        else {
            for (; b < 0; ++b) {
                c /= a;
            }
        }
        return c;
    }
    static e(a, b) {
        let c = truncate(Math.floor(log10(a)));
        let d = a / Math.pow(10, c);
        if (b) {
            let e = d < 1.5 ? 1 : d < 3 ? 2 : d < 7 ? 5 : 10;
            return e * Math.pow(10, c);
        }
        else {
            let f = d <= 1 ? 1 : d <= 2 ? 2 : d <= 5 ? 5 : 10;
            return f * Math.pow(10, c);
        }
    }
}
Snapper.$t = markType(Snapper, 'Snapper');
