<?php
/**
 * Condition template.
 *
 * @package woodmart
 */

?>
<div class="xts-popup-condition-template xts-hidden">
	<div class="xts-popup-condition">
		<select id="wd_layout_condition_comparison" class="xts-popup-condition-comparison" name="wd_layout_condition_comparison" aria-label="<?php esc_attr_e( 'Condition comparison', 'woodmart' ); ?>">
			<option value="include">
				<?php esc_html_e( 'Include', 'woodmart' ); ?>
			</option>
			<option value="exclude">
				<?php esc_html_e( 'Exclude', 'woodmart' ); ?>
			</option>
		</select>

		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="shop_archive" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="all">
				<?php esc_html_e( 'All product archives', 'woodmart' ); ?>
			</option>
			<option value="shop_page">
				<?php esc_html_e( 'Shop page', 'woodmart' ); ?>
			</option>
			<option value="product_search">
				<?php esc_html_e( 'Shop search results', 'woodmart' ); ?>
			</option>
			<option value="product_cats">
				<?php esc_html_e( 'Product categories', 'woodmart' ); ?>
			</option>
			<option value="product_tags">
				<?php esc_html_e( 'Product tags', 'woodmart' ); ?>
			</option>
			<?php if ( taxonomy_exists( 'product_brand' ) ) : ?>
				<option value="product_brands">
					<?php esc_html_e( 'Product brands', 'woodmart' ); ?>
				</option>
			<?php endif; ?>
			<option value="product_attr">
				<?php esc_html_e( 'Product attribute', 'woodmart' ); ?>
			</option>
			<option value="product_term">
				<?php esc_html_e( 'Product term (category, tag, brand, attribute)', 'woodmart' ); ?>
			</option>
			<option value="product_cat_children">
				<?php esc_html_e( 'Child product categories', 'woodmart' ); ?>
			</option>
			<option value="filtered_product_term">
				<?php esc_html_e( 'Filtered by attribute', 'woodmart' ); ?>
			</option>
			<option value="filtered_product_by_term">
				<?php esc_html_e( 'Filtered by term', 'woodmart' ); ?>
			</option>
			<option value="filtered_product_term_any" data-query-input="none">
				<?php esc_html_e( 'Filtered by any attribute', 'woodmart' ); ?>
			</option>
			<option value="filtered_product_stock_status">
				<?php esc_html_e( 'Filtered by stock status', 'woodmart' ); ?>
			</option>
		</select>

		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="single_product" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="all">
				<?php esc_html_e( 'All products', 'woodmart' ); ?>
			</option>
			<option value="product">
				<?php esc_html_e( 'Single product id', 'woodmart' ); ?>
			</option>
			<option value="product_cat">
				<?php esc_html_e( 'Product category', 'woodmart' ); ?>
			</option>
			<option value="product_cat_children">
				<?php esc_html_e( 'Child product categories', 'woodmart' ); ?>
			</option>
			<option value="product_tag">
				<?php esc_html_e( 'Product tag', 'woodmart' ); ?>
			</option>
			<?php if ( taxonomy_exists( 'product_brand' ) ) : ?>
				<option value="product_brand">
					<?php esc_html_e( 'Product brand', 'woodmart' ); ?>
				</option>
			<?php endif; ?>
			<option value="product_attr_term">
				<?php esc_html_e( 'Product attribute', 'woodmart' ); ?>
			</option>
			<option value="product_type">
				<?php esc_html_e( 'Product type', 'woodmart' ); ?>
			</option>
		</select>

		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="cart" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="cart">
				<?php esc_html_e( 'Cart page', 'woodmart' ); ?>
			</option>
		</select>

		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="empty_cart" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="empty_cart">
				<?php esc_html_e( 'Empty cart page', 'woodmart' ); ?>
			</option>
		</select>

		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="checkout_form" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="checkout_form">
				<?php esc_html_e( 'Checkout page form', 'woodmart' ); ?>
			</option>
		</select>

		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="checkout_content" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="checkout_content">
				<?php esc_html_e( 'Checkout page content', 'woodmart' ); ?>
			</option>
		</select>

		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="thank_you_page" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="all">
				<?php esc_html_e( 'All orders', 'woodmart' ); ?>
			</option>
			<optgroup label="<?php esc_attr_e( 'Products in order', 'woodmart' ); ?>">
				<option value="products">
					<?php esc_html_e( 'Product', 'woodmart' ); ?>
				</option>
				<option value="product_cat">
					<?php esc_html_e( 'Product category', 'woodmart' ); ?>
				</option>
				<option value="product_cat_children">
					<?php esc_html_e( 'Child categories', 'woodmart' ); ?>
				</option>
				<option value="product_tag">
					<?php esc_html_e( 'Product tag', 'woodmart' ); ?>
				</option>

				<?php if ( taxonomy_exists( 'product_brand' ) ) : ?>
					<option value="product_brand">
						<?php esc_html_e( 'Product brand', 'woodmart' ); ?>
					</option>
				<?php endif; ?>

				<option value="product_attr_term">
					<?php esc_html_e( 'Product attribute', 'woodmart' ); ?>
				</option>
				<option value="product_type">
					<?php esc_html_e( 'Product type', 'woodmart' ); ?>
				</option>
				<option value="product_shipping_class">
					<?php esc_html_e( 'Shipping class', 'woodmart' ); ?>
				</option>
			</optgroup>

			<optgroup label="<?php esc_attr_e( 'Order', 'woodmart' ); ?>">
				<option value="order_payment_gateway">
					<?php esc_html_e( 'Payment gateway', 'woodmart' ); ?>
				</option>
				<option value="order_shipping_method">
					<?php esc_html_e( 'Shipping method', 'woodmart' ); ?>
				</option>
				<option value="order_shipping_country">
					<?php esc_html_e( 'Shipping country', 'woodmart' ); ?>
				</option>
				<option value="order_billing_country">
					<?php esc_html_e( 'Billing country', 'woodmart' ); ?>
				</option>
			</optgroup>

			<optgroup label="<?php esc_attr_e( 'Totals', 'woodmart' ); ?>">
				<option value="order_total" data-query-input="number">
					<?php esc_html_e( 'Order total', 'woodmart' ); ?>
				</option>
				<option value="order_subtotal" data-query-input="number">
					<?php esc_html_e( 'Subtotal', 'woodmart' ); ?>
				</option>
				<option value="order_subtotal_after_discount" data-query-input="number">
					<?php esc_html_e( 'Subtotal after discount', 'woodmart' ); ?>
				</option>
			</optgroup>

			<optgroup label="<?php esc_attr_e( 'User', 'woodmart' ); ?>">
				<option value="user_logged_in" data-query-input="none">
					<?php esc_html_e( 'Logged in', 'woodmart' ); ?>
				</option>
				<option value="user_logged_out" data-query-input="none">
					<?php esc_html_e( 'Guest', 'woodmart' ); ?>
				</option>
			</optgroup>
		</select>

		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="single_post" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="all">
				<?php esc_html_e( 'All posts', 'woodmart' ); ?>
			</option>
			<option value="post_id">
				<?php esc_html_e( 'Single post id', 'woodmart' ); ?>
			</option>
			<option value="post_cat">
				<?php esc_html_e( 'Post category', 'woodmart' ); ?>
			</option>
			<option value="post_tag">
				<?php esc_html_e( 'Post tag', 'woodmart' ); ?>
			</option>
			<option value="post_format">
				<?php esc_html_e( 'Post format', 'woodmart' ); ?>
			</option>
		</select>

		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="single_portfolio" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="all">
			<?php esc_html_e( 'All projects', 'woodmart' ); ?>
			</option>
			<option value="project_id">
				<?php esc_html_e( 'Single project id', 'woodmart' ); ?>
			</option>
			<option value="project_cat">
				<?php esc_html_e( 'Project category', 'woodmart' ); ?>
			</option>
		</select>

		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="blog_archive" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="all">
				<?php esc_html_e( 'All blog archives', 'woodmart' ); ?>
			</option>
			<option value="blog_search_result">
				<?php esc_html_e( 'Blog search results', 'woodmart' ); ?>
			</option>
			<option value="blog_category"> 
				<?php esc_html_e( 'Blog categories', 'woodmart' ); ?>
			</option>
			<option value="blog_tag">
				<?php esc_html_e( 'Blog tags', 'woodmart' ); ?>
			</option>
			<option value="blog_author">
				<?php esc_html_e( 'Blog author page', 'woodmart' ); ?>
			</option>
			<option value="blog_date">
				<?php esc_html_e( 'Blog archives by date', 'woodmart' ); ?>
			</option>
		</select>
		
		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="portfolio_archive" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="all">
				<?php esc_html_e( 'All portfolio archives', 'woodmart' ); ?>
			</option>
			<option value="portfolio_search_result">
				<?php esc_html_e( 'Portfolio search results', 'woodmart' ); ?>
			</option>
			<option value="portfolio_category">
				<?php esc_html_e( 'Portfolio categories', 'woodmart' ); ?>
			</option>
		</select>

		<select class="xts-popup-condition-type" name="wd_layout_condition_type" data-type="my_account_page" aria-label="<?php esc_attr_e( 'Condition type', 'woodmart' ); ?>">
			<option value="all">
				<?php esc_html_e( 'All endpoints', 'woodmart' ); ?>
			</option>
			<?php
			if ( woodmart_woocommerce_installed() ) :
				$menu_items                  = wc_get_account_menu_items();
				$menu_items['waitlist']      = __( 'Waitlist', 'woodmart' );
				$menu_items['wishlist']      = __( 'Wishlist', 'woodmart' );
				$menu_items['price-tracker'] = __( 'Price tracker', 'woodmart' );
				unset( $menu_items['customer-logout'] );
				foreach ( $menu_items as $endpoint => $label ) :
					?>
					<option value="<?php echo esc_attr( $endpoint ); ?>">
						<?php echo esc_html( $label ); ?>
					</option>
				<?php endforeach; ?>
			<?php endif; ?>
		</select>

		<select class="xts-popup-condition-query xts-hidden" name="wd_layout_condition_query" placeholder="<?php echo esc_attr__( 'Start typing...', 'woodmart' ); ?>" aria-label="<?php esc_attr_e( 'Condition query', 'woodmart' ); ?>"></select>

		<span class="xts-popup-condition-query-number-wrap xts-hidden">
			<input type="number" class="xts-popup-condition-query-number" name="wd_layout_condition_query_number_min" min="0" step="0.01" placeholder="<?php esc_attr_e( 'min', 'woodmart' ); ?>" />

			<input type="number" class="xts-popup-condition-query-number" name="wd_layout_condition_query_number_max" min="0" step="0.01" placeholder="<?php esc_attr_e( 'max', 'woodmart' ); ?>" />
		</span>

		<a href="javascript:void(0);" class="xts-popup-condition-remove xts-bordered-btn xts-color-warning xts-style-icon xts-i-close" title="<?php esc_attr_e( 'Remove condition', 'woodmart' ); ?>"></a>
	</div>
</div>
