<?php
/**
 * Product description step 4 age focus template.
 *
 * @package SAAI
 */

if ( ! defined( 'ABSPATH' ) ) {
    die( 'You are not allowed to call this page directly.' );
}

$age_focus_options = require_once SAAI_PLUGIN_DIR_PATH . 'data/options-age-focus.php';
?>

<div class="saai-product-description-form-step saai-product-description-form-step-4 <?php echo ! empty( $age_focus ) ? 'valid' : ''; ?>" data-step="4">
    <h3><?php esc_html_e( 'Age focus', 'storeagent-ai-for-woocommerce' ); ?></h3>
    <div class="saai-product-description-form-step-content">
        <p class="saai-product-description-form-step-description"><?php esc_html_e( 'We’ll use this to make sure the copy is tailored to the right audience.', 'storeagent-ai-for-woocommerce' ); ?></p>
        <div class="saai-product-description-form-field saai-product-description-form-checkbox-group">
            <?php foreach ( $age_focus_options as $key => $label ) : ?>
                <label class="saai-product-description-form-field-checkbox-label">
                    <input type="checkbox" name="age_focus[]" value="<?php echo esc_attr( $key ); ?>" <?php checked( in_array( $key, $age_focus, true ) ); ?> />
                    <span><?php echo esc_html( $label ); ?></span>
                </label>
            <?php endforeach; ?>
        </div>

        <div class="saai-product-description-step-actions-field">
            <button type="button" class="button previous-step-button">
                <?php esc_html_e( 'Back', 'storeagent-ai-for-woocommerce' ); ?>
            </button>
            <button type="button" class="button-primary next-step-button">
                <?php esc_html_e( 'Next', 'storeagent-ai-for-woocommerce' ); ?>
            </button>
        </div>
    </div>
</div>
