<?php
/**
 * Standard schema definition.
 *
 * @package AIPT\Api\PromptBuilder\Schemas
 * @since   2.6.0
 */

namespace AIPT\Api\PromptBuilder\Schemas;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Provides the step schema for the standard generator wizard.
 */
class StandardSchema {

	/**
	 * Get the schema configuration for the standard generator.
	 *
	 * @return array<string, mixed> Schema configuration.
	 */
	public static function get_schema(): array {
		return array(
			'generator_type' => 'standard',
			'label'          => __( 'Standard Generator', 'ai-product-tools' ),
			'description'    => __( 'Create streamlined product content with essential guidance and formatting controls.', 'ai-product-tools' ),
			'prompt_mode'    => 'full',
			'steps'          => array(
				array(
					'key'         => 'writing_tone',
					'type'        => 'multi_select',
					'label'       => __( 'Writing Tone', 'ai-product-tools' ),
					'description' => __( 'Choose up to 3 tones that match your brand voice.', 'ai-product-tools' ),
					'required'    => true,
					'options_key' => 'tones',
					'min_items'   => 1,
					'max_items'   => 3,
				),
			array(
				'key'         => 'target_audience',
				'type'        => 'multi_select',
					'label'       => __( 'Target Audience', 'ai-product-tools' ),
					'description' => __( 'Select up to 3 audiences this description should speak to.', 'ai-product-tools' ),
					'required'    => false,
					'options_key' => 'target_audiences',
					'max_items'   => 3,
				),
				array(
					'key'         => 'content_goals',
					'type'        => 'multi_select',
					'label'       => __( 'Content Goals', 'ai-product-tools' ),
					'description' => __( 'Choose up to 3 outcomes the generated content should emphasize.', 'ai-product-tools' ),
					'required'    => false,
					'options_key' => 'content_goals',
					'max_items'   => 3,
				),
				array(
					'key'         => 'content_length',
					'type'        => 'single_select',
					'label'       => __( 'Content Length', 'ai-product-tools' ),
					'description' => __( 'Select the desired length for the generated content.', 'ai-product-tools' ),
					'required'    => true,
					'options'     => array(
						array(
							'value' => 'short',
							'label' => __( 'Short (50-100 words)', 'ai-product-tools' ),
						),
						array(
							'value' => 'medium',
							'label' => __( 'Medium (100-250 words)', 'ai-product-tools' ),
						),
						array(
							'value' => 'long',
							'label' => __( 'Long (250-500 words)', 'ai-product-tools' ),
						),
					),
				),
				array(
					'key'         => 'format_style',
					'type'        => 'single_select',
					'label'       => __( 'Format Style', 'ai-product-tools' ),
					'description' => __( 'Pick the preferred output structure.', 'ai-product-tools' ),
					'required'    => true,
					'options_key' => 'format_styles',
				),
				array(
					'key'         => 'writing_style',
					'type'        => 'single_select',
					'label'       => __( 'Writing Style', 'ai-product-tools' ),
					'description' => __( 'Choose a writing style to shape the final wording.', 'ai-product-tools' ),
					'required'    => false,
					'options_key' => 'writing_styles',
				),
				array(
					'key'           => 'language',
					'type'          => 'text_input',
					'label'         => __( 'Language', 'ai-product-tools' ),
					'description'   => __( 'Specify the language the generated content should use.', 'ai-product-tools' ),
					'required'      => true,
					'default_value' => 'English',
					'placeholder'   => __( 'e.g. English, Turkish', 'ai-product-tools' ),
				),
				array(
					'key'         => 'special_instructions',
					'type'        => 'textarea',
					'label'       => __( 'Special Instructions', 'ai-product-tools' ),
					'description' => __( 'Add any extra guidance for the generated result.', 'ai-product-tools' ),
					'required'    => false,
					'placeholder' => __( 'Any specific requirements...', 'ai-product-tools' ),
				),
				array(
					'key'         => 'review',
					'type'        => 'review',
					'label'       => __( 'Review', 'ai-product-tools' ),
					'description' => __( 'Review your selections before generating the prompt.', 'ai-product-tools' ),
				),
			),
		);
	}
}
