It will be entirely up to the regime to make its political decision. Detonating a nuclear device would not only cause worldwide consternation, it would without a doubt place the regime in an intolerable position whereby Israel may well react. There are those they may well celebrate said detonation, whilst the majority of good people in the Gulf and Arabian Peninsula will run for cover. For a nuclear armed theocracy will no doubt be used against is enemies both politically and quite well literally. Israel has been well prepared for such an event. Good day.
5 tourists rescued from Hebron after being hit by firebomb; 2 hurt (Haaretz)
from the article: MI chief: Iran has enough nuclear material for bomb