<?php
$gutenify_template_hub_theme = wp_get_theme();
// var_dump( $gutenify_template_hub_theme->get( 'Name' ) );

$gutenify_template_hub_screen = get_current_screen();
if (!empty($gutenify_template_hub_screen->base) && 'appearance_page_gutenify-template-hub-info' === $gutenify_template_hub_screen->base) {
	return false;
}

$gutenify_is_installed = file_exists(plugin_dir_path('gutenify'));
$gutenify_is_active = in_array('gutenify/gutenify.php', apply_filters('active_plugins', get_option('active_plugins')));

$show_notice = !($gutenify_is_installed && $gutenify_is_active);

if (!$show_notice) {
	return false;
}

?>
<div class="notice notice-success is-dismissible gutenify-template-hub-admin-notice">
	<div class="gutenify-template-hub-admin-notice-wrapper">
		<h2><?php esc_html_e('Hey, Thank you for installing ', 'gutenify-template-hub'); ?>
			<?php echo $gutenify_template_hub_theme->get('Name'); ?>
			<?php esc_html_e('Theme!', 'gutenify-template-hub'); ?>
		</h2>
		<p><?php esc_html_e('We recommend installing plugin: ', 'gutenify-template-hub'); ?>
			<strong><?php esc_html_e('Gutenify', 'gutenify-template-hub'); ?></strong>
		</p>
		<p><strong><?php esc_html_e('Gutenify', 'gutenify-template-hub'); ?></strong>
			<?php esc_html_e('provides multiple site demo and add advance features to your site.', 'gutenify-template-hub'); ?>
		</p>
		<div style="    display: flex;gap: 10px;align-items: center;">
			<a href="<?php echo esc_url(admin_url('themes.php?page=gutenify-template-hub-info')); ?>"
				class="button button-primary"><?php esc_html_e('Get Site Demo', 'gutenify-template-hub'); ?></a>
			<a href="<?php echo esc_url('https://gutenify.com'); ?>"
				target="_blank"><?php esc_html_e('Learn more about Gutenify', 'gutenify-template-hub'); ?></a>
		</div>
	</div>
</div>
<?php
