<?php
/**
 * Template: SEO Health Lighthouse mode test.
 *
 * @package SmartCrawl
 */

namespace SmartCrawl;

use SmartCrawl\Lighthouse\Options;

$option_name      = empty( $_view['option_name'] ) ? '' : $_view['option_name'];
$dashboard_device = Options::dashboard_widget_device();
?>
<div id="wds-seo-settings" class="sui-box-settings-row">
	<div class="sui-box-settings-col-1">
		<label class="sui-settings-label">
			<?php esc_html_e( 'Dashboard Widget', 'smartcrawl-seo' ); ?>
		</label>
		<p class="sui-description">
			<?php esc_html_e( 'Choose which device you want to show the SEO test results for on the Dashboard widget.', 'smartcrawl-seo' ); ?>
		</p>
	</div>

	<div class="sui-box-settings-col-2">
		<?php
		$this->render_view(
			'side-tabs',
			array(
				'id'    => 'wds-lighthouse-dashboard-widget-device',
				'name'  => "{$option_name}[lighthouse-dashboard-widget-device]",
				'value' => $dashboard_device,
				'tabs'  => array(
					array(
						'label' => esc_html__( 'Desktop', 'smartcrawl-seo' ),
						'value' => 'desktop',
					),
					array(
						'label' => esc_html__( 'Mobile', 'smartcrawl-seo' ),
						'value' => 'mobile',
					),
				),
			)
		);
		?>
	</div>
</div>

<div class="sui-box-footer">
	<button class="sui-button sui-button-blue">
		<span class="sui-loading-text">
			<span class="sui-icon-save" aria-hidden="true"></span>
			<?php esc_html_e( 'Save Settings', 'smartcrawl-seo' ); ?>
		</span>
		<span class="sui-icon-loader sui-loading" aria-hidden="true"></span>
	</button>
</div>
