<?php
/**
 * Browser caching meta box header.
 *
 * @package Hummingbird
 *
 * @var string $title   Title of the module.
 * @var int    $issues  Number of caching issues.
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

?>
<h3  class="sui-box-title"><?php echo esc_html( $title ); ?></h3>
<?php if ( $issues ) : ?>
	<div class="sui-actions-left">
		<span class="sui-tag sui-tag-warning"><?php echo (int) $issues; ?></span>
	</div>
<?php endif; ?>
<div class="sui-actions-right">
	<span class="wphb-label-notice-inline sui-hidden-xs sui-hidden-sm"><?php esc_html_e( 'Made changes?', 'wphb' ); ?></span>
	<button type="submit" class="sui-button sui-button-ghost" aria-live="polite">
		<!-- Default State Content -->
		<span class="sui-button-text-default">
			<span class="sui-icon-update" aria-hidden="true"></span>
			<?php esc_html_e( 'Re-Check Status', 'wphb' ); ?>
		</span>

		<!-- Loading State Content -->
		<span class="sui-button-text-onload">
			<span class="sui-icon-loader sui-loading" aria-hidden="true"></span>
			<?php esc_html_e( 'Updating Status', 'wphb' ); ?>
		</span>
	</button>
</div>