<?php
/**
 * Product Filter Widget - Layout Controls
 *
 * Included via require inside register_controls(). $this refers to the widget instance.
 *
 * @package GGM_Commerce
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

// $this is the GGM_Commerce_Product_Filter_Widget instance.

// -------------------------------------------------------------------------
// Layout Section
// -------------------------------------------------------------------------

$this->start_controls_section(
	'layout_section',
	[
		'label' => __( 'Layout', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_CONTENT,
	]
);

$this->add_control(
	'filter_layout',
	[
		'label'   => __( 'Filter Layout', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::SELECT,
		'default' => 'vertical',
		'options' => [
			'vertical'   => __( 'Vertical', 'ggm-commerce' ),
			'horizontal' => __( 'Horizontal', 'ggm-commerce' ),
		],
	]
);

$this->add_control(
	'columns',
	[
		'label'     => __( 'Columns', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::SELECT,
		'default'   => '1',
		'options'   => [
			'1' => __( '1 Column', 'ggm-commerce' ),
			'2' => __( '2 Columns', 'ggm-commerce' ),
			'3' => __( '3 Columns', 'ggm-commerce' ),
			'4' => __( '4 Columns', 'ggm-commerce' ),
			'5' => __( '5 Columns', 'ggm-commerce' ),
			'6' => __( '6 Columns', 'ggm-commerce' ),
			'7' => __( '7 Columns', 'ggm-commerce' ),
			'8' => __( '8 Columns', 'ggm-commerce' ),
		],
		'condition' => [
			'filter_layout' => 'horizontal',
		],
	]
);

$this->end_controls_section();
