/*
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 { Encoding } from "igniteui-angular-core";
import { Base, toNullable, String_$type, typeCast, markType } from "igniteui-angular-core";
/**
 * @hidden
 */
export class CodePageEncoding extends Encoding {
    static _ab(a, b) {
        let c = new Array(b.length);
        let d = toNullable(String_$type, null);
        for (let e = 0; e < b.length; e++) {
            c[e] = b[e] == a ? d : toNullable(String_$type, String.fromCharCode(b[e]));
        }
        return c;
    }
    static _getCodePage(a) {
        if (Base.equalsStatic(a, Encoding.unicode)) {
            return 1200;
        }
        if (Base.equalsStatic(a, Encoding.bigEndianUnicode)) {
            return 1201;
        }
        if (Base.equalsStatic(a.toString(), Encoding.uTF8.toString())) {
            return 65001;
        }
        let b = typeCast(CodePageEncoding.$, a);
        return b != null ? b._codePage : 0;
    }
}
CodePageEncoding.$t = markType(CodePageEncoding, 'CodePageEncoding', Encoding.$);
//# sourceMappingURL=CodePageEncoding.js.map