<?php
/** Title: Campaign Updates Section
 * Slug: crowdfunding-platform/campaign-updates
 * Description: Campaign updates and news section. Can be hidden via crowdfunding_platform_show_campaign_updates filter.
 * Categories: crowdfunding_platform
 * Keywords: updates, news, progress, timeline
 */

// Check if this section should be displayed
if ( ! apply_filters( 'crowdfunding_platform_show_campaign_updates', true ) ) {
    return;
}
?>

<!-- wp:group {"className":"campaign-section campaign-updates","layout":{"type":"default"}} -->
<div class="wp-block-group campaign-section campaign-updates">
	
	<?php if ( apply_filters( 'crowdfunding_platform_show_campaign_updates_title', true ) ) : ?>
	<!-- wp:heading {"level":2,"fontSize":"biggest","className":"pattern-heading-spacing-small"} -->
	<h2 class="wp-block-heading has-biggest-font-size pattern-heading-spacing-small"><?php echo esc_html( apply_filters( 'crowdfunding_platform_campaign_updates_title', __( 'Project Updates', 'crowdfunding-platform' ) ) ); ?></h2>
	<!-- /wp:heading -->
	<?php endif; ?>
	
	<?php
	// Build default updates content with translatable strings
	$default_updates_content = '
	<!-- wp:group {"layout":{"type":"default"}} -->
	<div class="wp-block-group pattern-content-spacing">
		<!-- wp:paragraph {"textColor":"secondary","fontSize":"small"} -->
		<p class="has-secondary-color has-text-color has-small-font-size">' . esc_html__( 'March 15, 2024', 'crowdfunding-platform' ) . '</p>
		<!-- /wp:paragraph -->

		<!-- wp:heading {"level":3,"textColor":"primary","fontSize":"bigger"} -->
		<h3 class="wp-block-heading has-primary-color has-text-color has-bigger-font-size">' . esc_html__( 'Prototype Testing Complete!', 'crowdfunding-platform' ) . '</h3>
		<!-- /wp:heading -->

		<!-- wp:paragraph {"fontSize":"base"} -->
		<p class="has-base-font-size pattern-content-spacing">' . esc_html__( 'We are excited to announce that our prototype has successfully passed all initial testing phases. The results exceeded our expectations and we are ready to move into the next phase of development.', 'crowdfunding-platform' ) . '</p>
		<!-- /wp:paragraph -->
	</div>
	<!-- /wp:group -->

	<!-- wp:group {"layout":{"type":"default"}} -->
	<div class="wp-block-group pattern-content-spacing">
		<!-- wp:paragraph {"textColor":"secondary","fontSize":"small"} -->
		<p class="has-secondary-color has-text-color has-small-font-size">' . esc_html__( 'March 1, 2024', 'crowdfunding-platform' ) . '</p>
		<!-- /wp:paragraph -->

		<!-- wp:heading {"level":3,"textColor":"primary","fontSize":"bigger"} -->
		<h3 class="wp-block-heading has-primary-color has-text-color has-bigger-font-size">' . esc_html__( 'Campaign Launch!', 'crowdfunding-platform' ) . '</h3>
		<!-- /wp:heading -->

		<!-- wp:paragraph {"fontSize":"base"} -->
		<p class="has-base-font-size pattern-content-spacing">' . esc_html__( 'Our crowdfunding campaign is now live! Thank you to everyone who has already shown support. We are committed to keeping you updated on our progress throughout this journey.', 'crowdfunding-platform' ) . '</p>
		<!-- /wp:paragraph -->
	</div>
	<!-- /wp:group -->
	';
	echo wp_kses_post( apply_filters( 'crowdfunding_platform_campaign_updates_list', $default_updates_content ) );
	?>
	
</div>
<!-- /wp:group -->