First-principles study of crystalline and amorphous AlMgB14-based materials