<?php

namespace DropshippingExportFreeVendor;

use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Form\Fields\ExportOptionsFormFields;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Action\Loader\Plugin\PluginLinksLoaderAction;
/**
 * @var string $title
 * @var bool $edit
 * @var string $previous_step
 * @var \Core\Infrastructure\View\Abstraction\Displayable $sidebar
 * @var \Core\Infrastructure\View\FormView $form
 * @var bool $is_variable
 * @var WPDesk\View\Renderer\Renderer $renderer
 */
$renderer->output_render('Header', ['title' => $title]);
$is_pl_lang = PluginLinksLoaderAction::is_pl_lang();
?>
<h2>
	<?php 
//TRANSLATORS: %s: page step.
echo \esc_html(\sprintf(\__('Step %s', 'dropshipping-export-free'), '4/4'));
?>
</h2>
<p>
<?php 
$docs_url = $is_pl_lang ? 'https://wpdesk.link/export-docs-step4-pl' : 'https://wpdesk.link/export-docs-step4';
echo \wp_kses_post(\sprintf(\__('Complete the product export settings. If you want to learn more about the process, visit the plugin\'s <a href="%s" target="_blank">documentation</a>.', 'dropshipping-export-free'), $docs_url));
?>
</p>
<hr>

<?php 
$form->form_start(['method' => 'POST', 'template' => 'form-start-no-table']);
?>
<div id="export-data-table-wrapper">
<table class="form-table width-100 center">
					<tbody>
						<?php 
$form->show_field(ExportOptionsFormFields::EXPORT_NAME, ['parent_template' => 'form-field']);
?>
						<?php 
$form->show_field(ExportOptionsFormFields::PRODUCT_IN_BATCHES, ['parent_template' => 'form-field']);
?>
						<?php 
$form->show_field(ExportOptionsFormFields::PRODUCT_COLUMN_SEPARATOR, ['parent_template' => 'form-field']);
?>
						<?php 
$form->show_field(ExportOptionsFormFields::CRON_WEEK_DAY, ['parent_template' => 'form-field']);
?>
						<?php 
$form->show_field(ExportOptionsFormFields::CRON_HOURS, ['parent_template' => 'form-field']);
?>
						<tr valign="top" style="display:none">
							<th class="titledesc" scope="row">
								<label><?php 
\esc_html_e('Files location', 'dropshipping-export-free');
?></label>
							</th>
							<td class="forminp">
								<?php 
$form->show_field(ExportOptionsFormFields::FILE_LOCATION_INTERNAL_ID);
?> <small style="margin-right:10px;"><?php 
$form->show_label(ExportOptionsFormFields::FILE_LOCATION_INTERNAL_ID);
?></small>
								<small></small>
							</td>
						</tr>
						<?php 
$form->show_field(ExportOptionsFormFields::FILE_FTP_PATH, ['parent_template' => 'form-field']);
?>
						<?php 
if ($form->has_field(ExportOptionsFormFields::SAVE_IMAGES_AS_ZIP)) {
    $form->show_field(ExportOptionsFormFields::SAVE_IMAGES_AS_ZIP, ['parent_template' => 'form-field']);
}
?>
															
					</tbody>
				</table>
</div>

			<br class="clear">
			<?php 
$renderer->output_render('Steps', ['edit' => $edit, 'mode' => $mode, 'form' => $form, 'previous_step' => $previous_step]);
?>

<?php 
$form->form_fields_complete();
$form->form_end(['template' => 'form-end-no-table']);
?>

<?php 
$renderer->output_render('Footer');
