function syncSongPlayPause(playlist, song, state) {
		/*
  	Ensures we have a string for the state otherwise we grab the
  	state from the config.
  */
		if (typeof state != "string") {
			state = _config2.default.active_song.paused ? "paused" : "playing";
		}

		/*
  	If the playlist is null or empty, we make sure that any song
  	that is a part of a playlist is set to paused.
  */
		if (playlist == null || playlist == '') {
			/*
   	Get all of the individual song play pause buttons. These have an
   	amplitude-song-index attribute. Some have amplitude-playlist which
   	means they are individual songs within a playlist.
   */
			var songPlayPauseElements = document.querySelectorAll('.amplitude-play-pause[amplitude-song-index]');

			/*
   	Iterate over all of the song play pause elements
   */
			for (var i = 0; i < songPlayPauseElements.length; i++) {
				/*
    	If the song element has an attribute for amplitude-playlist then
    	we set it to paused no matter what because the state of the player
    	is not in a playlist mode.
    */
				if (songPlayPauseElements[i].hasAttribute('amplitude-playlist')) {
					_helpers2.default.setElementPause(songPlayPauseElements[i]);
				} else {
					/*
     	If the state of the song is playing and the song index matches the
     	index of the song we have, we set the element to playing otherwise
     	we set the element to paused.
     */
					if (state == 'playing' && songPlayPauseElements[i].getAttribute('amplitude-song-index') == song) {
						_helpers2.default.setElementPlay(songPlayPauseElements[i]);
					} else {
						_helpers2.default.setElementPause(songPlayPauseElements[i]);
					}
				}
			}
		} else {
			/*
   	Get all of the individual song play pause buttons. These have an
   	amplitude-song-index attribute. Some have amplitude-playlist which
   	means they are individual songs within a playlist.
   */
			var _songPlayPauseElements = document.querySelectorAll('.amplitude-play-pause[amplitude-song-index]');

			/*
   	Iterate over all of the individual play pause elements.
   */
			for (var _i3 = 0; _i3 < _songPlayPauseElements.length; _i3++) {
				/*
    	Since we have an active playlist this time, we want any stand alone
    	songs to be set to paused since the scope is within a playlist.
    		We check to see if the element has an amplitude-playlist attribute.
    */
				if (_songPlayPauseElements[_i3].hasAttribute('amplitude-playlist')) {

					/*
     	Check to see if the song index matches the index passed in and the
     	playlist matches the scoped playlist we are looking for and the
     	state of the player is playing, then we set the element to play. If those
     	three parameters are not met, set the element to pause.
     */
					if (_songPlayPauseElements[_i3].getAttribute('amplitude-song-index') == song && _songPlayPauseElements[_i3].getAttribute('amplitude-playlist') == playlist && state == 'playing') {
						_helpers2.default.setElementPlay(_songPlayPauseElements[_i3]);
					} else {
						_helpers2.default.setElementPause(_songPlayPauseElements[_i3]);
					}
				} else {
					/*
     	Set any individual songs (songs outside of a playlist scope) to pause
     	since we are in the scope of a playlist.
     */
					_helpers2.default.setElementPause(_songPlayPauseElements[_i3]);
				}
			}
		}
	}
/**
  * Syncs the song play pause buttons to the state of the active song.
  *
  * @access public
  * @param {string} playlist 	- The playlist we are setting the play pause state for.
  * @param {int} song 					- The index of the song we are syncing the state for
  * @param {string} state 			- Either playing or paused for the state of the active song.
  */
Syncs the song play pause buttons to the state of the active song.
@access public
@param {string} playlist    - The playlist we are setting the play pause state for.
@param {int} song                                   - The index of the song we are syncing the state for
@param {string} state                       - Either playing or paused for the state of the active song.
Syncs the song play pause buttons to the state of the active song . @access public @param { string } playlist - The playlist we are setting the play pause state for . @param { int } song - The index of the song we are syncing the state for @param { string } state - Either playing or paused for the state of the active song .
function syncSongPlayPause(playlist, song, state) {
		if (typeof state != "string") {
			state = _config2.default.active_song.paused ? "paused" : "playing";
		}
		if (playlist == null || playlist == '') {
			var songPlayPauseElements = document.querySelectorAll('.amplitude-play-pause[amplitude-song-index]');
			for (var i = 0; i < songPlayPauseElements.length; i++) {
				if (songPlayPauseElements[i].hasAttribute('amplitude-playlist')) {
					_helpers2.default.setElementPause(songPlayPauseElements[i]);
				} else {
					if (state == 'playing' && songPlayPauseElements[i].getAttribute('amplitude-song-index') == song) {
						_helpers2.default.setElementPlay(songPlayPauseElements[i]);
					} else {
						_helpers2.default.setElementPause(songPlayPauseElements[i]);
					}
				}
			}
		} else {
			var _songPlayPauseElements = document.querySelectorAll('.amplitude-play-pause[amplitude-song-index]');
			for (var _i3 = 0; _i3 < _songPlayPauseElements.length; _i3++) {
				if (_songPlayPauseElements[_i3].hasAttribute('amplitude-playlist')) {
					if (_songPlayPauseElements[_i3].getAttribute('amplitude-song-index') == song && _songPlayPauseElements[_i3].getAttribute('amplitude-playlist') == playlist && state == 'playing') {
						_helpers2.default.setElementPlay(_songPlayPauseElements[_i3]);
					} else {
						_helpers2.default.setElementPause(_songPlayPauseElements[_i3]);
					}
				} else {
					_helpers2.default.setElementPause(_songPlayPauseElements[_i3]);
				}
			}
		}
	}
function syncSongPlayPause ( playlist , song , state ) { if ( typeof state != "string" ) { state = _config2 . default . active_song . paused ? "paused" : "playing" ; } if ( playlist == null || playlist == '' ) { var songPlayPauseElements = document . querySelectorAll ( '.amplitude-play-pause[amplitude-song-index]' ) ; for ( var i = 0 ; i < songPlayPauseElements . length ; i ++ ) { if ( songPlayPauseElements [ i ] . hasAttribute ( 'amplitude-playlist' ) ) { _helpers2 . default . setElementPause ( songPlayPauseElements [ i ] ) ; } else { if ( state == 'playing' && songPlayPauseElements [ i ] . getAttribute ( 'amplitude-song-index' ) == song ) { _helpers2 . default . setElementPlay ( songPlayPauseElements [ i ] ) ; } else { _helpers2 . default . setElementPause ( songPlayPauseElements [ i ] ) ; } } } } else { var _songPlayPauseElements = document . querySelectorAll ( '.amplitude-play-pause[amplitude-song-index]' ) ; for ( var _i3 = 0 ; _i3 < _songPlayPauseElements . length ; _i3 ++ ) { if ( _songPlayPauseElements [ _i3 ] . hasAttribute ( 'amplitude-playlist' ) ) { if ( _songPlayPauseElements [ _i3 ] . getAttribute ( 'amplitude-song-index' ) == song && _songPlayPauseElements [ _i3 ] . getAttribute ( 'amplitude-playlist' ) == playlist && state == 'playing' ) { _helpers2 . default . setElementPlay ( _songPlayPauseElements [ _i3 ] ) ; } else { _helpers2 . default . setElementPause ( _songPlayPauseElements [ _i3 ] ) ; } } else { _helpers2 . default . setElementPause ( _songPlayPauseElements [ _i3 ] ) ; } } } }
Syncs the song play pause buttons to the state of the active song.
Syncs the song play pause buttons to the state of the active song .
/*
  	Ensures we have a string for the state otherwise we grab the
  	state from the config.
  */ /*
  	If the playlist is null or empty, we make sure that any song
  	that is a part of a playlist is set to paused.
  */ /*
   	Get all of the individual song play pause buttons. These have an
   	amplitude-song-index attribute. Some have amplitude-playlist which
   	means they are individual songs within a playlist.
   */ /*
   	Iterate over all of the song play pause elements
   */ /*
    	If the song element has an attribute for amplitude-playlist then
    	we set it to paused no matter what because the state of the player
    	is not in a playlist mode.
    */ /*
     	If the state of the song is playing and the song index matches the
     	index of the song we have, we set the element to playing otherwise
     	we set the element to paused.
     */ /*
   	Get all of the individual song play pause buttons. These have an
   	amplitude-song-index attribute. Some have amplitude-playlist which
   	means they are individual songs within a playlist.
   */ /*
   	Iterate over all of the individual play pause elements.
   */ /*
    	Since we have an active playlist this time, we want any stand alone
    	songs to be set to paused since the scope is within a playlist.
    		We check to see if the element has an amplitude-playlist attribute.
    */ /*
     	Check to see if the song index matches the index passed in and the
     	playlist matches the scoped playlist we are looking for and the
     	state of the player is playing, then we set the element to play. If those
     	three parameters are not met, set the element to pause.
     */ /*
     	Set any individual songs (songs outside of a playlist scope) to pause
     	since we are in the scope of a playlist.
     */