<?php
/**
 * Accessibility profile presets (bundled visitor preferences).
 *
 * @package AccessibilityWidget
 */

namespace AccessibilityWidget\Includes;

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

final class AccessibilityProfiles {

	/**
	 * @return array<string, array{label: string, description: string, settings: array<string, int|bool>}>
	 */
	public static function getDefinitions(): array {
		return [
			'motor_impaired' => [
				'label'       => __( 'Motor impaired', 'wp-powersuite' ),
				'description' => __( 'Larger cursor, stronger focus outlines, and reduced motion.', 'wp-powersuite' ),
				'settings'    => [
					'bigBlackCursor'  => true,
					'focusOutlines'   => true,
					'pauseAnimations' => true,
				],
			],
			'visually_impaired' => [
				'label'       => __( 'Visually impaired', 'wp-powersuite' ),
				'description' => __( 'Higher contrast, larger text, and highlighted links.', 'wp-powersuite' ),
				'settings'    => [
					'textScale'        => 2,
					'highContrast'     => true,
					'highlightLinks'   => true,
					'highlightHeadings' => true,
					'underlineLinks'   => true,
					'focusOutlines'    => true,
				],
			],
			'color_blind' => [
				'label'       => __( 'Color blind', 'wp-powersuite' ),
				'description' => __( 'Underlined and highlighted links plus high contrast so meaning never relies on color alone.', 'wp-powersuite' ),
				'settings'    => [
					'highContrast'   => true,
					'underlineLinks' => true,
					'highlightLinks' => true,
				],
			],
			'dyslexia' => [
				'label'       => __( 'Dyslexia friendly', 'wp-powersuite' ),
				'description' => __( 'Readable font, spacing, and reading guide.', 'wp-powersuite' ),
				'settings'    => [
					'dyslexiaFont'        => true,
					'lineHeightLevel'     => 2,
					'letterSpacingLevel'  => 2,
					'wordSpacingLevel'    => 2,
					'readingGuide'        => true,
					'textAlignLeft'       => true,
				],
			],
			'adhd' => [
				'label'       => __( 'ADHD friendly', 'wp-powersuite' ),
				'description' => __( 'Reading guide, calmer layout, and paused motion.', 'wp-powersuite' ),
				'settings'    => [
					'readingGuide'    => true,
					'pauseAnimations' => true,
					'simplifyLayout'  => true,
					'focusOutlines'   => true,
				],
			],
			'cognitive' => [
				'label'       => __( 'Cognitive', 'wp-powersuite' ),
				'description' => __( 'Simplified layout, readable text, and clear navigation.', 'wp-powersuite' ),
				'settings'    => [
					'simplifyLayout'  => true,
					'readableFont'    => true,
					'textScale'       => 1,
					'lineHeightLevel' => 2,
					'underlineLinks'  => true,
					'pauseAnimations' => true,
				],
			],
			'seizure_safe' => [
				'label'       => __( 'Seizure safe', 'wp-powersuite' ),
				'description' => __( 'Stops animations and reduces motion effects.', 'wp-powersuite' ),
				'settings'    => [
					'pauseAnimations' => true,
					'lowSaturation'   => true,
				],
			],
		];
	}

	/** @return list<string> */
	public static function getProfileKeys(): array {
		return array_keys( self::getDefinitions() );
	}
}
