<?php
namespace Softech_Addons_for_Elementor\Widgets;

use Elementor\Controls_Manager;



if ( ! class_exists( 'Softech_Addons_for_Elementor\Widgets\Utilities' ) ) {

	class Utilities {

		/**
		 * Show a "Pro version" notice below specific controls.
		 */
		public static function upgrade_pro_notice( $widget, $type, $control_id, $depends_on, $pro_values = [] ) {
			$widget->add_control(
				$control_id . '_pro_notice',
				[
					'type' => $type,
					'raw' => sprintf(
						'<div class="softech-pro-notice">
							<strong>This feature is available in the 
							<a href="https://softechaddons.sitslab.com/#pro-plan" target="_blank">
							Pro version</a>.</strong>
						</div>'
					),
					'content_classes' => '.softech-pro-notice',
					'condition' => [
						$depends_on => $pro_values,
					],
				]
			);
		}
		
	}

	
}
