<?php
	if ( ! defined( 'ABSPATH' ) ) {
		exit;
	}

	$size = $args['size'] ?? 'default';

	switch ( $size ) {
		case 'small':
			?>
			<article
				id="post-<?php the_ID(); ?>"
				<?php post_class( 'g-519f7356' ); ?>
			>
				<a href="<?php the_permalink(); ?>" class="g-cfe3fc1d" data-mui-disabled="846bf699f" data-component-layout="2cd497" data-bs-focus="9e9bb89b2954">
					<div class="g-59d6219e" id="elem-6f0d62da8c897bff">
						<time class="g-c14fd660 g-6d736bfe g-a52e70a2"
						      datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>">
							<?php echo esc_html( get_the_date() ); ?>
						</time>
						<?php
							$categories = get_the_category();
							if ( ! empty( $categories ) ) :
								?>
								<div class="g-9a4d33ab g-6d736bfe" data-element-position="top" data-test-variant="filled" data-section-group="35951a5db3" data-bs-qa="43fb0212">
									<?php foreach ( $categories as $key => $category ) : ?>
										<span class="g-37d2f136">
											<?php echo esc_html( $category->name ); ?>
											<?php if ( $key !== count( $categories ) - 1 ) : ?>
												<span class="g-1fff7eab"></span>
											<?php endif; ?>
										</span>
									<?php endforeach; ?>
								</div>
							<?php endif; ?>
					</div>
					<div class="g-59d6219e g-c8c647d1" id="elem-91fb523203d360e8">
						<div class="g-c6356796 g-a52e70a2">
							<?php if ( has_post_thumbnail() ) : ?>
								<?php the_post_thumbnail( 'medium_large' ); ?>
							<?php endif; ?>
						</div>
						<div class="g-97007e62" data-bs-ride="b3af6746eaf" data-element-handler="4dc8476c36bc" data-analytics-qa="eb1e8e082f5" data-module-group="f3dbbdf47675">
							<h2 class="g-aa003104 g-fad23fa9" id="elem-00f2ee0a43cd2cbd">
								<?php the_title(); ?>
							</h2>
							<?php
								$short_description = get_post_meta(
									get_the_ID(),
									'short_description',
									true
								);

								$description = $short_description
									? $short_description
									: get_the_excerpt();
							?>

							<?php if ( ! empty( $description ) ) : ?>
								<p class="g-d4f24aab g-6d736bfe" data-component-role="footer" data-bs-expanded="0b458c2" data-bs-variant="contained">
									<?php echo esc_html( wp_trim_words( $description, 12 ) ); ?>
								</p>
							<?php endif; ?>
						</div>
					</div>
				</a>
			</article>
			<?php
			break;
		default:
			?>
			<article
				id="post-<?php the_ID(); ?>"
				<?php post_class( 'g-3617dc2a' ); ?>
			>
				<a href="<?php the_permalink(); ?>" class="g-cfe3fc1d" data-section-mode="edit" data-element-mode="disabled" data-analytics-size="large" data-section-state="inactive" data-block-layout="5db952f11f4d">
					<div class="g-c6356796" id="elem-04cac157ad289d3f">
						<?php if ( has_post_thumbnail() ) : ?>
							<?php the_post_thumbnail( 'medium_large' ); ?>
						<?php endif; ?>
					</div>
					<div class="g-97007e62" data-bs-value="ce7684" data-block-handler="93dd36" data-test-selector="f6ad36f64" data-test-pause="8cc6d5">
						<?php
							$categories = get_the_category();
							if ( ! empty( $categories ) ) :
								?>
								<div class="g-9a4d33ab g-6d736bfe" id="elem-febf848750249397">
									<?php foreach ( $categories as $key => $category ) : ?>
										<span class="g-37d2f136">
											<?php echo esc_html( $category->name ); ?>
											<?php if ( $key !== count( $categories ) - 1 ) : ?>
												<span class="g-1fff7eab"></span>
											<?php endif; ?>
										</span>
									<?php endforeach; ?>
								</div>
							<?php endif; ?>
						<time class="g-c14fd660 g-cfded025" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>">
							<?php echo esc_html( get_the_date() ); ?>
						</time>
						<h2 class="g-aa003104 g-fad23fa9" data-bs-slide-to="a955266307" data-mui-target="ab528d1">
							<?php the_title(); ?>
						</h2>
						<?php
							$short_description = get_post_meta(
								get_the_ID(),
								'short_description',
								true
							);

							$description = $short_description
								? $short_description
								: get_the_excerpt();
						?>

						<?php if ( ! empty( $description ) ) : ?>
							<p class="g-d4f24aab g-cfded025" data-block-priority="critical" data-component-action="submit" data-widget-config="902a5f5cf4" data-mui-value="b898e8a9e">
								<?php echo esc_html( wp_trim_words( $description, 12 ) ); ?>
							</p>
						<?php endif; ?>
						<span class="g-7efffffe g-9591e738">Read <svg width="18" height="12" viewBox="0 0 18 12"
						                                             fill="currentColor"
						                                             xmlns="http://www.w3.org/2000/svg">
<path
	d="M0.75 4.77295C0.335786 4.77295 0 5.10874 0 5.52295C0 5.93716 0.335786 6.27295 0.75 6.27295V5.52295V4.77295ZM17.2803 6.05328C17.5732 5.76039 17.5732 5.28551 17.2803 4.99262L12.5074 0.219648C12.2145 -0.073245 11.7396 -0.073245 11.4467 0.219648C11.1538 0.512542 11.1538 0.987415 11.4467 1.28031L15.6893 5.52295L11.4467 9.76559C11.1538 10.0585 11.1538 10.5334 11.4467 10.8263C11.7396 11.1191 12.2145 11.1191 12.5074 10.8263L17.2803 6.05328ZM0.75 5.52295V6.27295H16.75V5.52295V4.77295H0.75V5.52295Z"/>
</svg>
</span>
					</div>
				</a>
			</article>
			<?php
	}
?>