<?php

namespace TotalThemeCore\WPBakery\Params;

defined( 'ABSPATH' ) || exit;

/**
 * WPBakery Param => Text Shadow.
 */
final class Text_Shadow {

	/**
	 * Param callback.
	 */
	public static function output( $settings, $value ) {
		if ( ! function_exists( 'totaltheme_component' ) ) {
			return function_exists( 'vc_textfield_form_field' ) ? vc_textfield_form_field( $settings, $value ) : '';
		}
		ob_start();
			totaltheme_component( 'text_shadow', [
				'value'       => $value,
				'input_name'  => $settings['param_name'],
				'input_class' => esc_attr( "wpb_vc_param_value {$settings['param_name']} {$settings['type']}_field" ),
			] );
		$output = ob_get_clean();
		if ( ! empty( $settings['notice'] ) ) {
			$output .= '<div class="vcex-vc-notice vc_description vc_clearfix">' . wp_kses_post( $settings['notice'] ) . '</div>';
		}
		return $output;
	}

}
