( function() {
	'use strict';

	if ( 'object' !== typeof vc || 'function' !== typeof vc.shortcode_view ) {
		return false;
	}

	window.vcexWooTemplateView = vc.shortcode_view.extend( {
		changeShortcodeParams: function( model ) {
			window.vcexWooTemplateView.__super__.changeShortcodeParams.call( this, model );
			var part, target, inverted_value;
			part = model.getParam( 'part' );
			target = this.$el[0].querySelector( '.vcex-heading-text' );
			if ( part && _.isString( part ) && ! part.match(/^#E\-8_/) && _.has( this.params.part.choices, part ) ) {
				target.textContent = this.params.part.choices[part];
			} else {
				target.textContent = this.params.part.choices[''];
			}
		}
	} );

})();