<?php
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { exit; }

$wte_faq_items = wte_get_faq_items();
if ( empty( $wte_faq_items ) ) { return; }
?>
<section id="wte-faq" class="wte-section wte-section--faq">
	<div class="wte-container wte-container--narrow">
		<header class="wte-section__header">
			<h2 class="wte-section__heading"><?php esc_html_e( 'よくある質問', 'wte_' ); ?></h2>
		</header>
		<div class="wte-faq__list">
			<?php foreach ( $wte_faq_items as $item ) : ?>
				<details class="wte-faq__item">
					<summary class="wte-faq__question"><?php echo esc_html( $item['question'] ); ?></summary>
					<div class="wte-faq__answer"><?php echo wp_kses_post( $item['answer'] ); ?></div>
				</details>
			<?php endforeach; ?>
		</div>
	</div>
</section>
