This entirely depends on the degree of damage. If the fire was controlled early on or only focused on an isolated area, the chances of being able to repair it are bigger.
However, for fire damage that has taken most if not the entire area, the structure may need replacement. This is because once the foundation has been compromised, then it would not be safe to build on top of them anymore.