<?php

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class bt_bb_headline extends BT_BB_Element {

	function handle_shortcode( $atts, $content ) {
		extract( shortcode_atts( apply_filters( 'bt_bb_extract_atts_' . $this->shortcode, array(
			'ai_prompt'                     => '',
			'headline'      				=> '',
			'html_tag'      				=> '',
			'font'          				=> '',
			'font_subset'   				=> '',
			'font_load_extension'   		=> '',
			'size'     						=> '',
			'font_size'     				=> '',
			'font_weight'   				=> '',
			'text_transform'   				=> '',
			'superheadline_font_weight'   	=> '',
			'superheadline_text_transform'  => '',
			'subheadline_font_weight'   	=> '',
			'subheadline_text_transform'   	=> '',
			'color_scheme'  				=> '',
			'color'         				=> '',
			'supertitle_position'   		=> '',
			'dash'          				=> '',
			'align'         				=> '',
			'url'           				=> '',
			'target'        				=> '',
			'superheadline' 				=> '',
			'subheadline'   				=> ''
		) ), $atts, $this->shortcode ) );

		$allowed_html_tags = array( 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'span', 'p' );
	if ( ! in_array( $html_tag, $allowed_html_tags, true ) ) {
		$html_tag = 'h2';
	}

	$superheadline = html_entity_decode( $superheadline, ENT_QUOTES, 'UTF-8' );
		$subheadline = html_entity_decode( $subheadline, ENT_QUOTES, 'UTF-8' );
		$headline = html_entity_decode( $headline, ENT_QUOTES, 'UTF-8' );
		
		$superheadline = str_ireplace( array( '``' ), array( '"' ), $superheadline );
		$subheadline = str_ireplace( array( '``' ), array( '"' ), $subheadline );
		$headline = str_ireplace( array( '``' ), array( '"' ), $headline );
		
		$superheadline = wp_kses_post( $superheadline );
		$subheadline = wp_kses_post( $subheadline );
		$headline = wp_kses_post( $headline );

		if ( $font != '' && $font != 'inherit' ) {
			require_once( dirname(__FILE__) . '/../../content_elements_misc/misc.php' );
			bt_bb_enqueue_google_font( $font, $font_subset, $font_load_extension );
		}

		$class = array( $this->shortcode );
		$data_override_class = array();
		
		if ( $el_class != '' ) {
			$class[] = $el_class;
		}

		$id_attr = '';
		if ( $el_id != '' ) {
			$id_attr = ' ' . 'id="' . esc_attr( $el_id ) . '"';
		}
		
		$html_tag_style = "";
		$html_tag_style_arr = array();
		if ( $font != '' && $font != 'inherit' ) {
			$el_style = $el_style . ';' . 'font-family:\'' . urldecode( $font ) . '\'';
			$html_tag_style_arr[] = 'font-family:\'' . urldecode( $font ) . '\'';
		}
		if ( $font_size != '' ) {
			$html_tag_style_arr[] = 'font-size:' . $font_size  ;
		}
		if ( count( $html_tag_style_arr ) > 0 ) {
			$html_tag_style = ' style="' . esc_attr( implode( '; ', $html_tag_style_arr ) ) . '"';
		}
		
		if ( $font_weight != '' ) {
			$class[] = $this->prefix . 'font_weight' . '_' . $font_weight ;
		}
		
		if ( $text_transform != '' ) {
			$class[] = $this->prefix . 'text_transform' . '_' . $text_transform ;
		}
		
		if ( $superheadline_font_weight != '' ) {
			$class[] = $this->prefix . 'superheadline_font_weight' . '_' . $superheadline_font_weight ;
		}
		
		if ( $superheadline_text_transform != '' ) {
			$class[] = $this->prefix . 'superheadline_text_transform' . '_' . $superheadline_text_transform ;
		}
		
		if ( $subheadline_font_weight != '' ) {
			$class[] = $this->prefix . 'subheadline_font_weight' . '_' . $subheadline_font_weight ;
		}
		
		if ( $subheadline_text_transform != '' ) {
			$class[] = $this->prefix . 'subheadline_text_transform' . '_' . $subheadline_text_transform ;
		}
		
		$color_scheme_id = NULL;
		if ( is_numeric ( $color_scheme ) ) {
			$color_scheme_id = $color_scheme;
		} else if ( $color_scheme != '' ) {
			$color_scheme_id = bt_bb_get_color_scheme_id( $color_scheme );
		}
		$color_scheme_colors = bt_bb_get_color_scheme_colors_by_id( $color_scheme_id - 1 );
		if ( $color_scheme_colors ) $el_style .= '; --primary-color:' . $color_scheme_colors[0] . '; --secondary-color:' . $color_scheme_colors[1] . ';';
		if ( $color_scheme != '' ) $class[] = $this->prefix . 'color_scheme_' .  $color_scheme_id;

		if ( $color != '' ) {
			// No border-color — see r57877 (added) and r122832 (removed) for context.
			$el_style = $el_style . ';' . 'color:' . $color . ';';
		}

		if ( $dash != '' ) {
			$class[] = $this->prefix . 'dash' . '_' . $dash;
		}
		
		if ( $target == '' ) {
			$target = '_self';
		}

		$superheadline_inside = '';
		$superheadline_outside = '';
		
		if ( $superheadline != '' ) {
			$class[] = $this->prefix . 'superheadline';
			if ( $supertitle_position == 'outside' ) { 
				$superheadline_outside = '<span class="' . esc_attr( $this->shortcode ) . '_superheadline">' . $superheadline . '</span>';
				$class[] = $this->prefix . 'superheadline_outside';
			} else {
				$superheadline_inside = '<span class="' . esc_attr( $this->shortcode ) . '_superheadline">' . $superheadline . '</span>';
			}
		}
		
		if ( $subheadline != '' ) {
			$class[] = $this->prefix . 'subheadline';
			$subheadline = '<div class="' . esc_attr( $this->shortcode ) . '_subheadline">' . $subheadline . '</div>';
			$subheadline = nl2br( $subheadline );
		}
		
		$style_attr = '';
		$el_style = apply_filters( $this->shortcode . '_style', $el_style, $atts );
		if ( $el_style != '' ) {
			$style_attr = ' ' . 'style="' . esc_attr( $el_style ) . '"';
		}
		
		$this->responsive_data_override_class(
			$class, $data_override_class,
			array(
				'prefix' => $this->prefix,
				'param' => 'size',
				'value' => $size
			)
		);

		$this->responsive_data_override_class(
			$class, $data_override_class,
			array(
				'prefix' => $this->prefix,
				'param' => 'align',
				'value' => $align
			)
		);

		do_action( $this->shortcode . '_before_extra_responsive_param' );
		foreach ( $this->extra_responsive_data_override_param as $p ) {
			if ( ! is_array( $atts ) || ! array_key_exists( $p, $atts ) ) continue;
			$this->responsive_data_override_class(
				$class, $data_override_class,
				apply_filters( $this->shortcode . '_responsive_data_override', array(
					'prefix' => $this->prefix,
					'param' => $p,
					'value' => $atts[ $p ],
				) )
			);
		}
		
		$class = apply_filters( $this->shortcode . '_class', $class, $atts );
		$class_attr = implode( ' ', $class );
		
		if ( $el_class != '' ) {
			$class_attr = $class_attr . ' ' . $el_class;
		}
		
		if ( $headline != '' ) {
			if ( $url != '' ) {
				$url_title = wp_strip_all_tags( str_replace( array("\n", "\r"), ' ', $headline ) );
				$link = bt_bb_get_url( $url );
				// IMPORTANT: esc_attr (not esc_url) is intentional here.
				// Authors are allowed to put javascript: / mailto: / tel: / non-standard schemes
				// in the headline URL. esc_url would strip them. Do not "fix" this to esc_url —
				// it has been flagged by automated security audits before; it is by design.
				$headline = '<a href="' . esc_attr( $link ) . '" target="' . esc_attr( $target ) . '" title="' . esc_attr( $url_title )  . '">' . $headline . '</a>';
			}		
			$headline = '<span class="' . esc_attr( $this->shortcode ) . '_content"><span>' . $headline . '</span></span>';			
		}
		
		$headline = nl2br( $headline );
		
		//$html_tag = substr( $html_tag, 0, 2 );

		$output = '<header' . $id_attr . ' class="' . esc_attr( $class_attr ) . '"' . $style_attr . ' data-bt-override-class="' . htmlspecialchars( json_encode( $data_override_class, JSON_FORCE_OBJECT ), ENT_QUOTES, 'UTF-8' ) . '">';
		if ( $superheadline_outside != '' ) $output .= '<div class="' . $this->shortcode . '_superheadline_outside' . '">' . $superheadline_outside . '</div>';
		if ( $headline != '' || $superheadline_inside != '' ) $output .= '<' . $html_tag . $html_tag_style . ' class="bt_bb_headline_tag">' . $superheadline_inside . $headline . '</' . $html_tag . '>';
		$output .= $subheadline . '</header>';
		
		$output = apply_filters( 'bt_bb_general_output', $output, $atts );
		$output = apply_filters( $this->shortcode . '_output', $output, $atts );

		return $output;

	}

	function map_shortcode() {

		require( dirname(__FILE__) . '/../../content_elements_misc/fonts1.php' );
		
		require_once( dirname(__FILE__) . '/../../content_elements_misc/misc.php' );
		$color_scheme_arr = bt_bb_get_color_scheme_param_array();

		bt_bb_map( $this->shortcode, array( 'name' => esc_html__( 'Headline', 'bold-page-builder' ), 'description' => esc_html__( 'Headline with custom fonts (and AI help)', 'bold-page-builder' ), 'icon' => $this->prefix_backend . 'icon' . '_' . $this->shortcode, 'highlight' => true,
			'params' => array(
				array(
					'param_name' => 'ai_prompt',
					'type' => 'ai_prompt',
					'target' =>
						array(
							'superheadline' => array( 'alias' => 'supertitle', 'title' => esc_html__( 'Superheadline', 'bold-page-builder' ) ),
							'headline' => array( 'alias' => 'title', 'title' => esc_html__( 'Headline', 'bold-page-builder' ) ),
							'subheadline' => array( 'alias' => 'subtitle', 'title' => esc_html__( 'Subheadline', 'bold-page-builder' ) ),
						),
					'system_prompt' => 'You are a copywriter and your goal is to help users generate website content. Based on the user prompt generate supertitle, title and subtitle for the website page.',
				),
				array( 'param_name' => 'superheadline', 'type' => 'textfield', 'heading' => esc_html__( 'Superheadline', 'bold-page-builder' ), 'placeholder' => esc_html__( 'Add Superheadline text', 'bold-page-builder' ) ),
				array( 'param_name' => 'headline', 'type' => 'textarea', 'heading' => esc_html__( 'Headline', 'bold-page-builder' ), 'placeholder' => esc_html__( 'Add Headline text', 'bold-page-builder' ), 'preview' => true, 'preview_strong' => true ),
				array( 'param_name' => 'subheadline', 'type' => 'textarea', 'heading' => esc_html__( 'Subheadline', 'bold-page-builder' ), 'placeholder' => esc_html__( 'Add Subheadline text', 'bold-page-builder' ) ),
				array( 'param_name' => 'html_tag', 'type' => 'dropdown', 'heading' => esc_html__( 'Headline HTML tag', 'bold-page-builder' ), 'preview' => true,
					'value' => array(
						esc_html__( 'h1', 'bold-page-builder' ) 			=> 'h1',
						esc_html__( 'h2', 'bold-page-builder' ) 			=> 'h2',
						esc_html__( 'h3', 'bold-page-builder' ) 			=> 'h3',
						esc_html__( 'h4', 'bold-page-builder' ) 			=> 'h4',
						esc_html__( 'h5', 'bold-page-builder' ) 			=> 'h5',
						esc_html__( 'h6', 'bold-page-builder' ) 			=> 'h6',
						esc_html__( 'span', 'bold-page-builder' ) 		=> 'span',
						esc_html__( 'p', 'bold-page-builder' ) 			=> 'p'
				) ),
				array( 'param_name' => 'supertitle_position', 'type' => 'checkbox', 'value' => array( esc_html__( 'Yes', 'bold-page-builder' ) => 'outside' ), 'default' => 'outside', 'heading' => esc_html__( 'Put Superheadline outside HTML tag', 'bold-page-builder' ), 'preview' => true ),
				array( 'param_name' => 'size', 'type' => 'dropdown', 'heading' => esc_html__( 'Size', 'bold-page-builder' ), 'description' => esc_html__( 'Predefined Headline sizes, independent of HTML tag', 'bold-page-builder' ), 'preview' => true, 'responsive_override' => true,
					'value' => array(
						esc_html__( 'Inherit', 'bold-page-builder' ) 	=> 'inherit',
						esc_html__( 'Extra Small', 'bold-page-builder' ) => 'extrasmall',
						esc_html__( 'Small', 'bold-page-builder' ) 		=> 'small',
						esc_html__( 'Medium', 'bold-page-builder' ) 		=> 'medium',
						esc_html__( 'Normal', 'bold-page-builder' ) 		=> 'normal',
						esc_html__( 'Large', 'bold-page-builder' ) 		=> 'large',
						esc_html__( 'Extra large', 'bold-page-builder' ) => 'extralarge',
						esc_html__( 'Huge', 'bold-page-builder' ) 		=> 'huge'
					)
				),				
				array( 'param_name' => 'align', 'type' => 'dropdown', 'heading' => esc_html__( 'Alignment', 'bold-page-builder' ), 'responsive_override' => true,
					'value' => array(
						esc_html__( 'Inherit', 'bold-page-builder' ) 	=> 'inherit',
						esc_html__( 'Left', 'bold-page-builder' ) 		=> 'left',
						esc_html__( 'Center', 'bold-page-builder' ) 		=> 'center',
						esc_html__( 'Right', 'bold-page-builder' )		=> 'right'
					)
				),
				array( 'param_name' => 'dash', 'type' => 'dropdown', 'heading' => esc_html__( 'Dash', 'bold-page-builder' ), 'group' => esc_html__( 'Design', 'bold-page-builder' ),
					'value' => array(
						esc_html__( 'None', 'bold-page-builder' ) 			=> 'none',
						esc_html__( 'Top', 'bold-page-builder' ) 			=> 'top',
						esc_html__( 'Bottom', 'bold-page-builder' ) 			=> 'bottom',
						esc_html__( 'Top and bottom', 'bold-page-builder' ) 	=> 'top_bottom'
					)
				),
				array( 'param_name' => 'color_scheme', 'type' => 'dropdown', 'heading' => esc_html__( 'Color scheme', 'bold-page-builder' ), 'description' => esc_html__( 'Define color schemes in Bold Builder settings or define accent and alternate colors in theme customizer (if avaliable)', 'bold-page-builder' ), 'group' => esc_html__( 'Design', 'bold-page-builder' ), 'value' => $color_scheme_arr, 'preview' => true ),
				array( 'param_name' => 'color', 'type' => 'colorpicker', 'heading' => esc_html__( 'Color', 'bold-page-builder' ), 'group' => esc_html__( 'Design', 'bold-page-builder' ), 'preview' => true ),
				
				array( 'param_name' => 'font', 'type' => 'dropdown', 'heading' => esc_html__( 'Font', 'bold-page-builder' ), 'group' => esc_html__( 'Font', 'bold-page-builder' ), 'preview' => true,
					'value' => array( esc_html__( 'Inherit', 'bold-page-builder' ) => 'inherit' ) + BT_BB_Root::$font_arr
				),
				array( 'param_name' => 'font_subset', 'type' => 'textfield', 'heading' => esc_html__( 'Google font subset', 'bold-page-builder' ), 'group' => esc_html__( 'Font', 'bold-page-builder' ), 'value' => 'latin,latin-ext', 'placeholder' => esc_html__( 'E.g. latin,latin-ext,cyrillic,cyrillic-ext', 'bold-page-builder' ), 'description' => esc_html__( 'E.g. latin,latin-ext,cyrillic,cyrillic-ext', 'bold-page-builder' ) ),
				
				array( 'param_name' => 'font_load_extension', 'type' => 'textfield', 'heading' => esc_html__( 'Google variable font style specification', 'bold-page-builder' ), 'group' => esc_html__( 'Font', 'bold-page-builder' ), 'value' => '', 'description' => __( 'Define Google variable font style specification. For more details, <a href="https://fonts.google.com/knowledge/glossary/variable_fonts" target="_blank">read here</a>. Leave empty to load default font settings.', 'bold-page-builder' ), 'placeholder' => esc_html__( 'E.g. :ital,wght@0,200;1,700', 'bold-page-builder' ) ),
				array( 'param_name' => 'font_size', 'type' => 'textfield', 'heading' => esc_html__( 'Custom font size', 'bold-page-builder' ), 'group' => esc_html__( 'Font', 'bold-page-builder' ), 'placeholder' => esc_html__( 'E.g. 20px or 1.5rem', 'bold-page-builder' ) ),
				array( 'param_name' => 'font_weight', 'type' => 'dropdown', 'heading' => esc_html__( 'Headline font weight', 'bold-page-builder' ), 'group' => esc_html__( 'Font', 'bold-page-builder' ),
					'value' => array(
						esc_html__( 'Default', 'bold-page-builder' ) 	=> '',
						esc_html__( 'Normal', 'bold-page-builder' ) 		=> 'normal',
						esc_html__( 'Bold', 'bold-page-builder' ) 		=> 'bold',
						esc_html__( 'Bolder', 'bold-page-builder' ) 		=> 'bolder',
						esc_html__( 'Lighter', 'bold-page-builder' ) 	=> 'lighter',
						esc_html__( 'Light', 'bold-page-builder' ) 		=> 'light',
						esc_html__( '100', 'bold-page-builder' ) 		=> '100',
						esc_html__( '200', 'bold-page-builder' ) 		=> '200',
						esc_html__( '300', 'bold-page-builder' ) 		=> '300',
						esc_html__( '400', 'bold-page-builder' ) 		=> '400',
						esc_html__( '500', 'bold-page-builder' ) 		=> '500',
						esc_html__( '600', 'bold-page-builder' ) 		=> '600',
						esc_html__( '700', 'bold-page-builder' ) 		=> '700',
						esc_html__( '800', 'bold-page-builder' ) 		=> '800',
						esc_html__( '900', 'bold-page-builder' ) 		=> '900'
					)
				),
				array( 'param_name' => 'text_transform', 'type' => 'dropdown', 'heading' => esc_html__( 'Headline text transform', 'bold-page-builder' ), 'group' => esc_html__( 'Font', 'bold-page-builder' ),
					'value' => array(
						esc_html__( 'Default', 'bold-page-builder' ) 	=> '',
						esc_html__( 'None', 'bold-page-builder' ) 		=> 'none',
						esc_html__( 'Initial', 'bold-page-builder' ) 	=> 'initial',
						esc_html__( 'Inherit', 'bold-page-builder' ) 	=> 'inherit',
						esc_html__( 'UPPERCASE', 'bold-page-builder' ) 	=> 'uppercase',
						esc_html__( 'Capitalize', 'bold-page-builder' ) 	=> 'capitalize',
						esc_html__( 'lowercase', 'bold-page-builder' ) 	=> 'lowercase'
					)
				),
				array( 'param_name' => 'superheadline_font_weight', 'type' => 'dropdown', 'heading' => esc_html__( 'Superheadline font weight', 'bold-page-builder' ), 'group' => esc_html__( 'Font', 'bold-page-builder' ),
					'value' => array(
						esc_html__( 'Default', 'bold-page-builder' ) 	=> '',
						esc_html__( 'Normal', 'bold-page-builder' ) 		=> 'normal',
						esc_html__( 'Bold', 'bold-page-builder' ) 		=> 'bold',
						esc_html__( 'Bolder', 'bold-page-builder' ) 		=> 'bolder',
						esc_html__( 'Lighter', 'bold-page-builder' ) 	=> 'lighter',
						esc_html__( 'Light', 'bold-page-builder' ) 		=> 'light',
						esc_html__( 'Thin', 'bold-page-builder' ) 		=> 'thin',
						esc_html__( '100', 'bold-page-builder' ) 		=> '100',
						esc_html__( '200', 'bold-page-builder' ) 		=> '200',
						esc_html__( '300', 'bold-page-builder' ) 		=> '300',
						esc_html__( '400', 'bold-page-builder' ) 		=> '400',
						esc_html__( '500', 'bold-page-builder' ) 		=> '500',
						esc_html__( '600', 'bold-page-builder' ) 		=> '600',
						esc_html__( '700', 'bold-page-builder' ) 		=> '700',
						esc_html__( '800', 'bold-page-builder' ) 		=> '800',
						esc_html__( '900', 'bold-page-builder' ) 		=> '900'
					)
				),
				array( 'param_name' => 'superheadline_text_transform', 'type' => 'dropdown', 'heading' => esc_html__( 'Superheadline text transform', 'bold-page-builder' ), 'group' => esc_html__( 'Font', 'bold-page-builder' ),
					'value' => array(
						esc_html__( 'Default', 'bold-page-builder' ) 	=> '',
						esc_html__( 'None', 'bold-page-builder' ) 		=> 'none',
						esc_html__( 'Initial', 'bold-page-builder' ) 	=> 'initial',
						esc_html__( 'Inherit', 'bold-page-builder' ) 	=> 'inherit',
						esc_html__( 'UPPERCASE', 'bold-page-builder' ) 	=> 'uppercase',
						esc_html__( 'Capitalize', 'bold-page-builder' ) 	=> 'capitalize',
						esc_html__( 'lowercase', 'bold-page-builder' ) 	=> 'lowercase'
					)
				),
				array( 'param_name' => 'subheadline_font_weight', 'type' => 'dropdown', 'heading' => esc_html__( 'Subheadline font weight', 'bold-page-builder' ), 'group' => esc_html__( 'Font', 'bold-page-builder' ),
					'value' => array(
						esc_html__( 'Default', 'bold-page-builder' ) 	=> '',
						esc_html__( 'Normal', 'bold-page-builder' ) 		=> 'normal',
						esc_html__( 'Bold', 'bold-page-builder' ) 		=> 'bold',
						esc_html__( 'Bolder', 'bold-page-builder' ) 		=> 'bolder',
						esc_html__( 'Lighter', 'bold-page-builder' ) 	=> 'lighter',
						esc_html__( 'Light', 'bold-page-builder' ) 		=> 'light',
						esc_html__( 'Thin', 'bold-page-builder' ) 		=> 'thin',
						esc_html__( '100', 'bold-page-builder' ) 		=> '100',
						esc_html__( '200', 'bold-page-builder' ) 		=> '200',
						esc_html__( '300', 'bold-page-builder' ) 		=> '300',
						esc_html__( '400', 'bold-page-builder' ) 		=> '400',
						esc_html__( '500', 'bold-page-builder' ) 		=> '500',
						esc_html__( '600', 'bold-page-builder' ) 		=> '600',
						esc_html__( '700', 'bold-page-builder' ) 		=> '700',
						esc_html__( '800', 'bold-page-builder' ) 		=> '800',
						esc_html__( '900', 'bold-page-builder' ) 		=> '900'
					)
				),
				array( 'param_name' => 'subheadline_text_transform', 'type' => 'dropdown', 'heading' => esc_html__( 'Subheadline text transform', 'bold-page-builder' ), 'group' => esc_html__( 'Font', 'bold-page-builder' ),
					'value' => array(
						esc_html__( 'Default', 'bold-page-builder' ) 	=> '',
						esc_html__( 'None', 'bold-page-builder' ) 		=> 'none',
						esc_html__( 'Initial', 'bold-page-builder' ) 	=> 'initial',
						esc_html__( 'Inherit', 'bold-page-builder' ) 	=> 'inherit',
						esc_html__( 'UPPERCASE', 'bold-page-builder' ) 	=> 'uppercase',
						esc_html__( 'Capitalize', 'bold-page-builder' ) 	=> 'capitalize',
						esc_html__( 'lowercase', 'bold-page-builder' ) 	=> 'lowercase'
					)
				),
				array( 'param_name' => 'url', 'type' => 'link', 'heading' => esc_html__( 'URL', 'bold-page-builder' ), 'description' => esc_html__( 'Enter full or local URL (e.g. https://www.bold-themes.com or /pages/about-us) or post slug (e.g. about-us) or search for existing content.', 'bold-page-builder' ), 'group' => esc_html__( 'URL', 'bold-page-builder' ) ),
				array( 'param_name' => 'target', 'type' => 'dropdown', 'heading' => esc_html__( 'Target', 'bold-page-builder' ), 'group' => esc_html__( 'URL', 'bold-page-builder' ),
					'value' => array(
						esc_html__( 'Self (open in same tab)', 'bold-page-builder' ) => '_self',
						esc_html__( 'Blank (open in new tab)', 'bold-page-builder' ) => '_blank'
					)
				)
			)
		) );
	}
}