<?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', 'wppowersuite-lite' ),
				'description' => __( 'Larger cursor, stronger focus outlines, and reduced motion.', 'wppowersuite-lite' ),
				'settings'    => [
					'bigBlackCursor'  => true,
					'focusOutlines'   => true,
					'pauseAnimations' => true,
				],
			],
			'visually_impaired' => [
				'label'       => __( 'Visually impaired', 'wppowersuite-lite' ),
				'description' => __( 'Higher contrast, larger text, and highlighted links.', 'wppowersuite-lite' ),
				'settings'    => [
					'textScale'        => 2,
					'highContrast'     => true,
					'highlightLinks'   => true,
					'highlightHeadings' => true,
					'underlineLinks'   => true,
					'focusOutlines'    => true,
				],
			],
			'color_blind' => [
				'label'       => __( 'Color blind', 'wppowersuite-lite' ),
				'description' => __( 'Underlined and highlighted links plus high contrast so meaning never relies on color alone.', 'wppowersuite-lite' ),
				'settings'    => [
					'highContrast'   => true,
					'underlineLinks' => true,
					'highlightLinks' => true,
				],
			],
			'dyslexia' => [
				'label'       => __( 'Dyslexia friendly', 'wppowersuite-lite' ),
				'description' => __( 'Readable font, spacing, and reading guide.', 'wppowersuite-lite' ),
				'settings'    => [
					'dyslexiaFont'        => true,
					'lineHeightLevel'     => 2,
					'letterSpacingLevel'  => 2,
					'wordSpacingLevel'    => 2,
					'readingGuide'        => true,
					'textAlignLeft'       => true,
				],
			],
			'adhd' => [
				'label'       => __( 'ADHD friendly', 'wppowersuite-lite' ),
				'description' => __( 'Reading guide, calmer layout, and paused motion.', 'wppowersuite-lite' ),
				'settings'    => [
					'readingGuide'    => true,
					'pauseAnimations' => true,
					'simplifyLayout'  => true,
					'focusOutlines'   => true,
				],
			],
			'cognitive' => [
				'label'       => __( 'Cognitive', 'wppowersuite-lite' ),
				'description' => __( 'Simplified layout, readable text, and clear navigation.', 'wppowersuite-lite' ),
				'settings'    => [
					'simplifyLayout'  => true,
					'readableFont'    => true,
					'textScale'       => 1,
					'lineHeightLevel' => 2,
					'underlineLinks'  => true,
					'pauseAnimations' => true,
				],
			],
			'seizure_safe' => [
				'label'       => __( 'Seizure safe', 'wppowersuite-lite' ),
				'description' => __( 'Stops animations and reduces motion effects.', 'wppowersuite-lite' ),
				'settings'    => [
					'pauseAnimations' => true,
					'lowSaturation'   => true,
				],
			],
		];
	}

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