<?php
/**
 * WeCodeArt Framework.
 *
 * WARNING: This file is part of the core WeCodeArt Framework. DO NOT edit this file under any circumstances.
 * Please do all modifications in the form of a child theme.
 *
 * @package 	WeCodeArt Framework
 * @subpackage 	Support\Styles\Property\FontFamily
 * @copyright   Copyright (c) 2025, WeCodeArt Framework
 * @since 		5.0.0
 * @version		5.5.8
 */

namespace WeCodeArt\Support\Styles\Sanitize\Property;

defined( 'ABSPATH' ) || exit;

use WeCodeArt\Support\Styles\Sanitize\Property;

/**
 * Output for CSS properties.
 */
class Focal extends Property {
	/**
	 * Modifies the value.
	 *
	 * @access protected
	 */
	protected function process_value() {
		$processed = '';

		if ( is_array( $this->value ) && isset( $this->value['x'] ) && isset( $this->value['y'] ) ) {
			$processed = round( $this->value['x'] * 100 ) . '% ' . round( $this->value['y'] * 100 ) . '%';
		}
		
		$this->value = esc_attr( $processed );
	}
}