<?php

if ( ! function_exists( 'calla_elated_map_woocommerce_meta' ) ) {
	function calla_elated_map_woocommerce_meta() {
		
		$woocommerce_meta_box = calla_elated_create_meta_box(
			array(
				'scope' => array( 'product' ),
				'title' => esc_html__( 'Product Meta', 'calla' ),
				'name'  => 'woo_product_meta'
			)
		);
		
		calla_elated_create_meta_box_field(
			array(
				'name'        => 'eltdf_product_featured_image_size',
				'type'        => 'select',
				'label'       => esc_html__( 'Dimensions for Product List Shortcode', 'calla' ),
				'description' => esc_html__( 'Choose image layout when it appears in Elated Product List - Masonry layout shortcode', 'calla' ),
				'options'     => array(
					''                                   => esc_html__( 'Default', 'calla' ),
					'eltdf-woo-image-small'              => esc_html__( 'Small', 'calla' ),
					'eltdf-woo-image-large-width'        => esc_html__( 'Large Width', 'calla' ),
					'eltdf-woo-image-large-height'       => esc_html__( 'Large Height', 'calla' ),
					'eltdf-woo-image-large-width-height' => esc_html__( 'Large Width Height', 'calla' )
				),
				'parent'      => $woocommerce_meta_box
			)
		);
		
		calla_elated_create_meta_box_field(
			array(
				'name'          => 'eltdf_show_title_area_woo_meta',
				'type'          => 'select',
				'default_value' => '',
				'label'         => esc_html__( 'Show Title Area', 'calla' ),
				'description'   => esc_html__( 'Disabling this option will turn off page title area', 'calla' ),
				'options'       => calla_elated_get_yes_no_select_array(),
				'parent'        => $woocommerce_meta_box
			)
		);
		
		calla_elated_create_meta_box_field(
			array(
				'name'          => 'eltdf_show_new_sign_woo_meta',
				'type'          => 'yesno',
				'default_value' => 'no',
				'label'         => esc_html__( 'Show New Sign', 'calla' ),
				'description'   => esc_html__( 'Enabling this option will show new sign mark on product', 'calla' ),
				'parent'        => $woocommerce_meta_box
			)
		);
	}
	
	add_action( 'calla_elated_meta_boxes_map', 'calla_elated_map_woocommerce_meta', 99 );
}