<select class="change fr-dynamic-link-select" id="fr-dynamic-link-list" data-fn="dynamicLinkShortcodeChanged">
	<# _.each(links, function(group, group_name) { #>
	<# if(group_name){ #>
	<optgroup label="<#= group_name #>">
		<# _.each(group, function(link) { #>
		<option value="<#= link.url #>" data-shortcode-id="<#= link.id #>" data-compat-id="<#= link.inserted_id #>"><#= link.name #></option>
		<# }); #>
	</optgroup>

	<# }else{ #>
	<# _.each(group, function(link) { #>
		<# if ( link.show ) { #>
			<option value="<#= link.url #>" data-shortcode-id="<#= link.id #>"><#= link.label || link.name #></option>
		<# } #>
	<# }); #>
	<# } #>
	<# }); #>
</select>
<# if ( typeof options !== 'undefined' ) { #>
<# _.each( options, function( item, optionId ) { #>
<div class="dynamic-extra-opt control-grid mt-15 mb-0" style="display: none" data-show-for="<#-optionId#>">
	<div class="label"><#-item.label#></div>
	<div class="input">
		<# if ( item.type === 'select' ) { #>
		<select class="dynamic-extra-option" data-field="<#-optionId#>">
			<# _.each( item.options, function( optLabel, optValue ) { #>
			<option value="<#-optValue#>"><#-optLabel#></option>
			<# } ) #>
		</select>
		<# } #>
	</div>
</div>
<# } ) #>
<# } #>
<div class="dynamic-link-custom-options" style="display: none">
	<div class="tcb-woo-product-dynamic-select-container control-grid mt-15">
		<select id="tcb-woo-product-dynamic-select" class="tcb-woo-select"></select>
	</div>
	<div class="no-product-picked-error inline-message m-error p-0 mb-15 mt-5" style="display: none"><?php tcb_icon( 'close2' );
		echo __( 'Be careful, no product selected', 'thrive-cb' ); ?></div>
	<div class="tcb-woo-product-variation full-width" style="display: none"></div>
	<div class="no-variation-picked-error inline-message m-error p-0 mb-15 mt-5" style="display: none"><?php tcb_icon( 'close2' );
		echo __( 'Be careful, no product variation selected.', 'thrive-cb' ); ?></div>
	<div class="full-width tcb-woo-product-dynamic-link-redirect"></div>
</div>
