it's an important question, but the really important question is what was shared and what purpose did it serve?
.
Trump obviously thought it was important to share this intel.  He may have discussed this with the country that supplied the information before he shared, or after or not at all.  It may have furthered cooperation regarding isis or it may have helped DT personally - we don't know.
.
We also don't know the reason for the leak.  It may have been to alert the country of a national security breech - or it may have been to subvert an unpopular (to the leaker) president.  Again - we don't know.
.
We can only make informed assumptions based on past actions.  So far Trump appears to have made poor policy decisions and to have significant conflicts of interest.  That suggests that the sharing of information may be self serving - but we have yet to determine that