<?php
/**
 * Wishlist Widget - Layout Controls
 *
 * @package GGM_Commerce
 */

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

// $this is the GGM_Commerce_Widget_Wishlist instance.

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

$this->add_control(
	'layout',
	array(
		'label'   => __( 'Layout', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::SELECT,
		'default' => 'table',
		'options' => array(
			'table' => __( 'Table', 'ggm-commerce' ),
			'grid'  => __( 'Grid', 'ggm-commerce' ),
			'list'  => __( 'List', 'ggm-commerce' ),
		),
	)
);

$this->add_responsive_control(
	'columns',
	array(
		'label'     => __( 'Columns', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::SELECT,
		'default'   => '4',
		'options'   => array(
			'1' => '1',
			'2' => '2',
			'3' => '3',
			'4' => '4',
			'5' => '5',
			'6' => '6',
		),
		'condition' => array(
			'layout' => 'grid',
		),
	)
);

$this->add_control(
	'show_image',
	array(
		'label'        => __( 'Show Product Image', 'ggm-commerce' ),
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'default'      => 'yes',
		'label_on'     => __( 'Show', 'ggm-commerce' ),
		'label_off'    => __( 'Hide', 'ggm-commerce' ),
		'return_value' => 'yes',
	)
);

$this->add_control(
	'show_price',
	array(
		'label'        => __( 'Show Price', 'ggm-commerce' ),
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'default'      => 'yes',
		'label_on'     => __( 'Show', 'ggm-commerce' ),
		'label_off'    => __( 'Hide', 'ggm-commerce' ),
		'return_value' => 'yes',
	)
);

$this->add_control(
	'show_stock_status',
	array(
		'label'        => __( 'Show Stock Status', 'ggm-commerce' ),
		'type'         => \Elementor\Controls_Manager::SWITCHER,
		'default'      => 'yes',
		'label_on'     => __( 'Show', 'ggm-commerce' ),
		'label_off'    => __( 'Hide', 'ggm-commerce' ),
		'return_value' => 'yes',
	)
);

$this->end_controls_section();
