/*
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 * as tslib_1 from "tslib";
import { Encoding } from "igniteui-angular-core";
import { Base, toNullable, String_$type, typeCast, markType } from "igniteui-angular-core";
/**
 * @hidden
 */
var CodePageEncoding = /** @class */ (function (_super) {
    tslib_1.__extends(CodePageEncoding, _super);
    function CodePageEncoding() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    CodePageEncoding._ab = function (a, b) {
        var c = new Array(b.length);
        var d = toNullable(String_$type, null);
        for (var e = 0; e < b.length; e++) {
            c[e] = b[e] == a ? d : toNullable(String_$type, String.fromCharCode(b[e]));
        }
        return c;
    };
    CodePageEncoding._getCodePage = function (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;
        }
        var b = typeCast(CodePageEncoding.$, a);
        return b != null ? b._codePage : 0;
    };
    CodePageEncoding.$t = markType(CodePageEncoding, 'CodePageEncoding', Encoding.$);
    return CodePageEncoding;
}(Encoding));
export { CodePageEncoding };
//# sourceMappingURL=CodePageEncoding.js.map