<?php

/**
 * @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.
 */

$is_pl_lang = \get_locale() === 'pl_PL';
$url        = $is_pl_lang ? 'https://wpdesk.link/dropshipping-product-export-pro-pl' : 'https://wpdesk.link/dropshipping-product-export-pro';
?>

<tr valign="top">
	<?php
	if ( $field->has_label() ) {
		?>
		<?php
		$renderer->output_render( 'form-label', [ 'field' => $field ] );
		?>
		<?php
	}
	?>

	<td class="forminp">
		<?php
		$field->set_attribute( 'disabled', 'disabled' );
		$renderer->output_render(
			$template_name,
			[
				'field'               => $field,
				'renderer'            => $renderer,
				'name_prefix'         => $name_prefix,
				'value'               => $value,
			]
		);
		?>

		<?php
		if ( $field->has_description() ) {
			?>
			<p class="description"><?php echo \wp_kses_post( $field->get_description() ); ?></p>
			<?php
		}
		?>
		<div class="buy-pro-version"><a target="_blank" href="<?php echo esc_url( $url ); ?>"><?php echo esc_html( __( 'Upgrade to PRO &rarr;', 'dropshipping-export-free' ) ); ?>  </a> <?php echo esc_html( __( 'to fully unlock this feature', 'dropshipping-export-free' ) ); ?></div>
	</td>
</tr>
<?php
