/*
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, Boolean_$type, fromEnum, typeCast, markType, getInstanceType } from "igniteui-angular-core";
import { ISupportSetProperty_$type } from "./ISupportSetProperty";
import { List$1 } from "igniteui-angular-core";
import { CT_Cfvo } from "./CT_Cfvo";
import { ColorInfo } from "./ColorInfo";
import { CultureInfo } from "igniteui-angular-core";
import { ST_OnOff } from "./ST_OnOff";
import { parseUInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
export class CT_DataBar extends Base {
    constructor() {
        super();
        this.c = null;
        this.a = null;
        this.e = toNullable(Number_$type, null);
        this.d = toNullable(Number_$type, null);
        this.f = toNullable(Boolean_$type, null);
        this.c = new List$1(CT_Cfvo.$, 0);
    }
    static j(a, b, c, d) {
        b = toNullable(Number_$type, null);
        c = toNullable(Number_$type, null);
        d = toNullable(Boolean_$type, null);
        for (let e of fromEnum(a.ab.u)) {
            switch (e.a.e(a.d)) {
                case "minLength":
                    b = toNullable(Number_$type, parseUInt32_1(e.d, CultureInfo.invariantCulture));
                    break;
                case "maxLength":
                    c = toNullable(Number_$type, parseUInt32_1(e.d, CultureInfo.invariantCulture));
                    break;
                case "showValue":
                    d = toNullable(Boolean_$type, ST_OnOff.e(e.d));
                    break;
                default: break;
            }
        }
        return {
            p1: b,
            p2: c,
            p3: d
        };
    }
    static k(a, b, c = toNullable(Number_$type, null), d = toNullable(Number_$type, null), e = toNullable(Boolean_$type, null)) {
        a.ad.p(b, null);
        let f = null;
        let g = null;
        if (c.hasValue) {
            g = "maxLength";
            f = c.value.toString();
            a.ad.h(g, f);
        }
        if (d.hasValue) {
            g = "minLength";
            f = d.value.toString();
            a.ad.h(g, f);
        }
        if (e.hasValue) {
            g = "showValue";
            f = ST_OnOff.g(e.value);
            a.ad.h(g, f);
        }
    }
    setProperty(a, b) {
        switch (a) {
            case 252:
                this.c.add(typeCast(CT_Cfvo.$, b));
                break;
            case 302:
                this.a = typeCast(ColorInfo.$, b);
                break;
            default: break;
        }
    }
    toString() {
        let a = getInstanceType(this);
        return a != null ? a.typeName : super.toString();
    }
}
CT_DataBar.$t = markType(CT_DataBar, 'CT_DataBar', Base.$, [ISupportSetProperty_$type]);
//# sourceMappingURL=CT_DataBar.js.map