<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

/** @var string $dashboard */
/** @var string $check_url */
/** @var string $title */
/** @var string $type */
/** @var string $message */
/** @var string $extra */
/** @var bool $dismissible */
/** @var string $dismiss_url */
/** @var array $links */
?>
<div id="<?php echo esc_attr( "wposes_license_notice_{$type}" ); ?>" class="wposes-license-notice notice notice-info important <?php echo esc_attr( $dismissible ? 'is-dismissible' : '' ); ?>">
	<p>
		<strong><?php echo esc_html( $title ); ?></strong> &mdash; <?php echo wp_kses_post( $message ); ?>
	</p>

	<?php if ( $extra ) : ?>
		<p>
			<?php echo wp_kses_post( $extra ); ?>
		</p>
	<?php endif; ?>

	<?php if ( $links ) : ?>
		<p class="notice-links">
			<?php echo wp_kses_post( join( ' | ', $links ) ); ?>
		</p>
	<?php endif; ?>

	<?php if ( $args['dismissible'] ) : // use inline script to omit need to enqueue a script dashboard-wide ?>
<script>
( function( $ ) {
	$( '#<?php echo esc_js( "wposes_license_notice_{$type}.is-dismissible" ); ?>' ).on( 'click', '.notice-dismiss', function() {
		$.get( '<?php echo esc_url( $args['dismiss_url'] ); ?>' );
	} );
} )( jQuery );
</script>
	<?php endif ?>
</div>