<?php
/**
 * Category description step 3 common characteristics template.
 *
 * @package SAAI
 */

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

<div class="saai-category-description-form-step saai-category-description-form-step-3 <?php echo ! empty( $common_characteristics ) ? 'valid' : ''; ?>" data-step="3">
    <h3><?php esc_html_e( 'Common Characteristics', '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( 'What are the common characteristics of products in this category? Add as many as needed.', 'storeagent-ai-for-woocommerce' ); ?></p>

        <div class="saai-category-description-characteristics-container">
            <label for="saai-category-description-form-field-characteristics"><?php esc_html_e( 'Common characteristics:', 'storeagent-ai-for-woocommerce' ); ?></label>
            <div class="saai-category-description-form-field">
                <select name="characteristics[]" multiple="multiple" style="width: 100%;">
                    <?php if ( ! empty( $characteristics ) ) : ?>
                        <?php foreach ( $characteristics as $characteristic ) : ?>
                            <option value="<?php echo esc_attr( $characteristic ); ?>" selected><?php echo esc_html( $characteristic ); ?></option>
                        <?php endforeach; ?>
                    <?php endif; ?>
                </select>
            </div>
        </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>
