"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.zzplayas_to_zzconvert = void 0;
const zzplayas_to_zzconvert_MM_1 = require("../../MM/ModelData/backwards_compat/zzplayas_to_zzconvert_MM");
const zzplayas_to_zzconvert_OOT_1 = require("../../OoT/ModelData/backwards_compat/zzplayas_to_zzconvert_OOT");
const zzplayas_magic_number_1 = __importDefault(require("./zzplayas_magic_number"));
class zzplayas_to_zzconvert {
    static processOotZobj(buf) {
        if (!zzplayas_magic_number_1.default.hasMagicNumber(buf)) {
            throw new Error("This zobj isn't a valid ML64 model file.");
        }
        let zz = new zzplayas_to_zzconvert_OOT_1.zzplayas_to_zzconvert_OOT();
        let age = buf.readUInt8(0x500B);
        switch (age) {
            case 0:
                return zz.convert_adult(buf);
            case 1:
                return zz.convert_child(buf);
        }
    }
    static processMMZobj(buf) {
        if (!zzplayas_magic_number_1.default.hasMagicNumber(buf)) {
            throw new Error("This zobj isn't a valid ML64 model file.");
        }
        let zz = new zzplayas_to_zzconvert_MM_1.zzplayas_to_zzconvert_MM();
        return zz.convert_human(buf);
    }
}
exports.zzplayas_to_zzconvert = zzplayas_to_zzconvert;
//# sourceMappingURL=zzplayas_to_zzconvert.js.map