<?php

namespace DropshippingExportFreeVendor;

/**
 * @var \WPDesk\Forms\Field $field
 * @var \WPDesk\View\Renderer\Renderer $renderer
 * @var string $name_prefix
 * @var string $value
 *
 * @var string $template_name Real field template.
 */
?>
		<table class="wp-list-table widefat fixed striped" style="margin-bottom:30px;">
			<tbody class="dropshipping_categories_rows">
			<tr>
				<td class="attributes-category">
					<h3> <?php 
echo \esc_html($field->get_label());
?></h3>
					<table width="100%" class="wp-list-table widefat fixed striped">
						<thead>
						<tr>
							<th class="attribute-category"> <?php 
\esc_html_e('Attribute Name', 'dropshipping-export-free');
?> </th>
							<th> <?php 
\esc_html_e('Woocommerce field', 'dropshipping-export-free');
?>	</th>
						</tr>
						</thead>
						<tbody>
							<?php 
foreach ($field->get_items() as $single_field) {
    $val = '';
    if (\is_array($value) && isset($value[$single_field->get_name()])) {
        $val = $value[$single_field->get_name()];
    }
    ?>
									<tr>
									<td> <?php 
    echo \esc_html($single_field->get_label());
    ?> </td>
									<td>
								<?php 
    $renderer->output_render($single_field->get_template_name(), ['field' => $single_field, 'renderer' => $renderer, 'name_prefix' => $name_prefix . '[' . $field->get_name() . ']', 'value' => $val, 'multiple' => $single_field->is_multiple()]);
    ?>
									</td>
									</tr>
								<?php 
}
?>
													</tbody>
					</table>
				</td>
			</tr>
			</tbody>
		</table>

<?php 
