<?php
/**
 * No Content message template.
 * @version 1.0.0
 * @since 1.8.0
 */

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

$image   = $image ?? STOREENGINE_ASSETS_URI . 'images/NoDataAvailable.svg';
$title   = $title ?? __( 'No content Available!', 'storeengine' );
$message = $message ?? esc_html__( 'No data was found to see the available list here.', 'storeengine' );
$classes = 'storeengine-oops storeengine-oops__message ' . ($classes ?? '');

?>
<div class="<?php echo esc_attr( trim( $classes ) ); ?>">
	<?php if ( $image ) { ?>
		<div class="storeengine-oops__icon">
			<img src="<?php echo esc_url( $image ); ?>" alt="<?php echo esc_attr( $title ); ?>">
		</div>
		<div class="storeengine-oops__content">
			<h3 class="storeengine-oops__heading"><?php echo esc_html( $title ); ?></h3>
			<div class="storeengine-oops__text"><?php echo wp_kses_post( wpautop( wptexturize( $message ) ) ); ?></div>
		</div>
	<?php } else { ?>
		<div class="storeengine-oops__icon">
			<h3 class="storeengine-oops__heading"><?php echo esc_html( $title ); ?></h3>
			<div class="storeengine-oops__text"><?php echo wp_kses_post( wpautop( wptexturize( $message ) ) ); ?></div>
		</div>
	<?php } ?>
</div>
