// import-player-template.ts — engine ExportedPlayerTemplate → schema PlayerTemplate
export function importPlayerTemplate(exported) {
    const fidelity = [];
    if (!exported)
        return { template: undefined, fidelity };
    if (!exported.spawnPointId) {
        fidelity.push({
            level: 'approximated', domain: 'player', severity: 'info',
            fieldPath: 'spawnPointId',
            message: 'Player template spawn point ID will be generated during import',
            reason: 'spawn-point-generated',
        });
    }
    return {
        template: {
            name: exported.name,
            defaultArchetypeId: exported.defaultArchetypeId,
            defaultBackgroundId: exported.defaultBackgroundId,
            baseStats: { ...exported.baseStats },
            baseResources: { ...exported.baseResources },
            startingInventory: [...exported.startingInventory],
            startingEquipment: { ...exported.startingEquipment },
            spawnPointId: exported.spawnPointId,
            tags: [...exported.tags],
            custom: { ...exported.custom },
        },
        fidelity,
    };
}
//# sourceMappingURL=import-player-template.js.map