Whenever a nonconforming structure or use is damaged by fire, collapse, flood, explosion, earthquake, war, riot, act of God or public enemy, or to the extent of 50% or less of its estimated assessed value as indicated in the records of the county assessor at the time of damage, it may be reconstructed. The nonconforming structure or use shall not be allowed to be reconstructed if the damage is greater than 50% of its estimated assessed value as indicated in the records of the county assessor at the time of damage and no building permit has been applied for within 180 days of when the property was damaged.