import { get_data_for_the_row_template } from './get_data_for_the_row_template';

export const append_row_to_table = ( productName: string, tbody: JQuery<HTMLElement> ) => {
	const templateData = get_data_for_the_row_template( productName, tbody.find( 'tr' ).length / 3 );
	const template = window.wp.template( 'update-product-dimensions' );
	const rowMarkup = template( templateData );
	tbody.append( rowMarkup );
};
