<?php
/**
 * Category description step 2 tones template.
 *
 * @package SAAI
 */

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

$tone_options = require_once SAAI_PLUGIN_DIR_PATH . 'data/options-tones.php';
?>

<div class="saai-category-description-form-step saai-category-description-form-step-2 <?php echo ! empty( $tones ) ? 'valid' : ''; ?>" data-step="2">
    <h3><?php esc_html_e( 'Writing Tone', 'storeagent-ai-for-woocommerce' ); ?></h3>
    <div class="saai-category-description-form-step-content">
        <p class="saai-category-description-form-step-description"><?php esc_html_e( 'Select what "tones" you want for your category description:', 'storeagent-ai-for-woocommerce' ); ?></p>
        <div class="saai-category-description-form-field saai-category-description-form-checkbox-group">
            <?php foreach ( $tone_options as $tone_value => $label ) : ?>
            <label class="saai-category-description-form-field-checkbox-label">
                <input type="checkbox" name="tones[]" value="<?php echo esc_attr( $tone_value ); ?>" <?php checked( in_array( $tone_value, $tones, true ) ); ?> />
                <span><?php echo esc_html( $label ); ?></span>
            </label>
            <?php endforeach; ?>
        </div>

        <div class="saai-category-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>
