/* Product editor — show the custom estimate fields only when
 * "Custom estimate for this product" is selected. */
( function ( $ ) {
	'use strict';

	function toggle() {
		var show = $( '#_edfw_enable' ).val() === 'override';
		$( '.edfw-product-override' ).toggle( show );
	}

	$( function () {
		toggle();
		$( document.body ).on( 'change', '#_edfw_enable', toggle );
	} );
}( jQuery ) );
