<?php
/**
 * Order Confirmation Widget - Style Controls
 *
 * @package GGM_Commerce
 */

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

// $this is the GGM_Commerce_Widget_Order_Confirmation instance.

// Style Section - Success Header
$this->start_controls_section(
	'section_style_header',
	[
		'label' => __( 'Success Header', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	]
);

// Icon subsection
$this->add_control(
	'success_icon_heading',
	[
		'label'     => __( 'Icon', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'condition' => [
			'show_success_icon' => 'yes',
		],
	]
);

$this->add_control(
	'success_icon_type',
	[
		'label'     => __( 'Icon Type', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::SELECT,
		'default'   => 'checkmark-circle',
		'options'   => [
			'checkmark-circle' => __( 'Checkmark Circle', 'ggm-commerce' ),
			'checkmark-badge'  => __( 'Checkmark Badge', 'ggm-commerce' ),
			'checkmark-simple' => __( 'Simple Checkmark', 'ggm-commerce' ),
			'shopping-bag'     => __( 'Shopping Bag', 'ggm-commerce' ),
			'gift'             => __( 'Gift Box', 'ggm-commerce' ),
			'heart'            => __( 'Heart', 'ggm-commerce' ),
			'star'             => __( 'Star', 'ggm-commerce' ),
			'thumbs-up'        => __( 'Thumbs Up', 'ggm-commerce' ),
			'custom'           => __( 'Custom Icon', 'ggm-commerce' ),
		],
		'condition' => [
			'show_success_icon' => 'yes',
		],
	]
);

$this->add_control(
	'success_custom_icon',
	[
		'label'     => __( 'Choose Icon', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::ICONS,
		'default'   => [
			'value'   => 'fas fa-check-circle',
			'library' => 'fa-solid',
		],
		'condition' => [
			'show_success_icon'  => 'yes',
			'success_icon_type'  => 'custom',
		],
	]
);

$this->add_control(
	'success_icon_color',
	[
		'label'     => __( 'Icon Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-confirmation-icon'     => 'color: {{VALUE}};',
			'{{WRAPPER}} .ggmc-order-confirmation-icon svg' => 'fill: {{VALUE}}; stroke: {{VALUE}};',
		],
		'condition' => [
			'show_success_icon' => 'yes',
		],
	]
);

$this->add_control(
	'success_icon_background',
	[
		'label'     => __( 'Icon Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-confirmation-icon' => 'background-color: {{VALUE}};',
		],
		'condition' => [
			'show_success_icon' => 'yes',
		],
	]
);

$this->add_control(
	'success_icon_size',
	[
		'label'      => __( 'Icon Size', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => [ 'px' ],
		'range'      => [
			'px' => [
				'min' => 24,
				'max' => 120,
			],
		],
		'selectors'  => [
			'{{WRAPPER}} .ggmc-order-confirmation-icon'     => 'font-size: {{SIZE}}{{UNIT}};',
			'{{WRAPPER}} .ggmc-order-confirmation-icon svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
		],
		'condition'  => [
			'show_success_icon' => 'yes',
		],
	]
);

$this->add_control(
	'success_icon_box_size',
	[
		'label'      => __( 'Icon Box Size', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => [ 'px' ],
		'range'      => [
			'px' => [
				'min' => 40,
				'max' => 200,
			],
		],
		'selectors'  => [
			'{{WRAPPER}} .ggmc-order-confirmation-icon' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
		],
		'condition'  => [
			'show_success_icon' => 'yes',
		],
	]
);

// Title subsection
$this->add_control(
	'title_heading',
	[
		'label'     => __( 'Title', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	]
);

$this->add_control(
	'title_color',
	[
		'label'     => __( 'Title Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-confirmation-title' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'title_typography',
		'label'    => __( 'Title Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-order-confirmation-title',
	]
);

// Message subsection
$this->add_control(
	'message_heading',
	[
		'label'     => __( 'Message', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	]
);

$this->add_control(
	'message_color',
	[
		'label'     => __( 'Message Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-confirmation-message' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'message_typography',
		'label'    => __( 'Message Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-order-confirmation-message',
	]
);

$this->end_controls_section();

// Style Section - Order Details
$this->start_controls_section(
	'section_style_details',
	[
		'label' => __( 'Order Details', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	]
);

$this->add_control(
	'details_background',
	[
		'label'     => __( 'Background Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-details-section' => 'background-color: {{VALUE}};',
		],
	]
);

$this->add_control(
	'details_border_radius',
	[
		'label'      => __( 'Border Radius', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => [ 'px', '%' ],
		'selectors'  => [
			'{{WRAPPER}} .ggmc-order-details-section' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		],
	]
);

$this->add_control(
	'details_padding',
	[
		'label'      => __( 'Padding', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => [ 'px', 'em', '%' ],
		'selectors'  => [
			'{{WRAPPER}} .ggmc-order-details-section' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		],
	]
);

$this->add_control(
	'section_heading_color',
	[
		'label'     => __( 'Section Heading Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-section-title' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'section_heading_typography',
		'label'    => __( 'Section Heading Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-order-section-title',
	]
);

$this->end_controls_section();

// Style Section - Order Overview
$this->start_controls_section(
	'section_style_overview',
	[
		'label' => __( 'Order Overview', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	]
);

// Labels subsection
$this->add_control(
	'overview_labels_heading',
	[
		'label' => __( 'Labels', 'ggm-commerce' ),
		'type'  => \Elementor\Controls_Manager::HEADING,
	]
);

$this->add_control(
	'label_order_number',
	[
		'label'     => __( 'Order Number Label', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::TEXT,
		'default'   => __( 'Order Number:', 'ggm-commerce' ),
		'condition' => [
			'show_order_number' => 'yes',
		],
	]
);

$this->add_control(
	'label_order_date',
	[
		'label'     => __( 'Order Date Label', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::TEXT,
		'default'   => __( 'Order Date:', 'ggm-commerce' ),
		'condition' => [
			'show_order_date' => 'yes',
		],
	]
);

$this->add_control(
	'label_payment_method',
	[
		'label'     => __( 'Payment Method Label', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::TEXT,
		'default'   => __( 'Payment Method:', 'ggm-commerce' ),
		'condition' => [
			'show_payment_method' => 'yes',
		],
	]
);

$this->add_control(
	'label_email',
	[
		'label'   => __( 'Email Label', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => __( 'Email:', 'ggm-commerce' ),
	]
);

// Styling subsection
$this->add_control(
	'overview_style_heading',
	[
		'label'     => __( 'Styling', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	]
);

$this->add_control(
	'overview_label_color',
	[
		'label'     => __( 'Label Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-meta-label' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'overview_label_typography',
		'label'    => __( 'Label Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-order-meta-label',
	]
);

$this->add_control(
	'overview_value_color',
	[
		'label'     => __( 'Value Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-meta-value' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'overview_value_typography',
		'label'    => __( 'Value Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-order-meta-value',
	]
);

$this->end_controls_section();

// Style Section - Order Items Table
$this->start_controls_section(
	'section_style_table',
	[
		'label'     => __( 'Order Items Table', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => [
			'show_order_items' => 'yes',
		],
	]
);

// Column Labels subsection
$this->add_control(
	'table_labels_heading',
	[
		'label' => __( 'Column Labels', 'ggm-commerce' ),
		'type'  => \Elementor\Controls_Manager::HEADING,
	]
);

$this->add_control(
	'label_product',
	[
		'label'   => __( 'Product Column', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => __( 'Product', 'ggm-commerce' ),
	]
);

$this->add_control(
	'label_qty',
	[
		'label'   => __( 'Qty Column', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => __( 'Qty', 'ggm-commerce' ),
	]
);

$this->add_control(
	'label_price',
	[
		'label'   => __( 'Price Column', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => __( 'Price', 'ggm-commerce' ),
	]
);

$this->add_control(
	'label_total',
	[
		'label'   => __( 'Total Column', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => __( 'Total', 'ggm-commerce' ),
	]
);

// Header styling subsection
$this->add_control(
	'table_header_style_heading',
	[
		'label'     => __( 'Header Styling', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	]
);

$this->add_control(
	'table_header_background',
	[
		'label'     => __( 'Header Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-items-table thead th' => 'background-color: {{VALUE}};',
		],
	]
);

$this->add_control(
	'table_header_color',
	[
		'label'     => __( 'Header Text Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-items-table th' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'table_header_typography',
		'label'    => __( 'Header Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-order-items-table th',
	]
);

// Row styling subsection
$this->add_control(
	'table_row_style_heading',
	[
		'label'     => __( 'Row Styling', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	]
);

$this->add_control(
	'table_row_background',
	[
		'label'     => __( 'Row Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-items-table tbody tr' => 'background-color: {{VALUE}};',
		],
	]
);

$this->add_control(
	'table_row_alt_background',
	[
		'label'     => __( 'Alternate Row Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-items-table tbody tr:nth-child(even)' => 'background-color: {{VALUE}};',
		],
	]
);

$this->add_control(
	'table_cell_color',
	[
		'label'     => __( 'Cell Text Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-items-table td' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'table_cell_typography',
		'label'    => __( 'Cell Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-order-items-table td',
	]
);

$this->add_control(
	'table_border_color',
	[
		'label'     => __( 'Border Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-items-table, {{WRAPPER}} .ggmc-order-items-table th, {{WRAPPER}} .ggmc-order-items-table td' => 'border-color: {{VALUE}};',
		],
	]
);

$this->end_controls_section();

// Style Section - Order Totals
$this->start_controls_section(
	'section_style_totals',
	[
		'label'     => __( 'Order Totals', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => [
			'show_totals' => 'yes',
		],
	]
);

// Labels subsection
$this->add_control(
	'totals_labels_heading',
	[
		'label' => __( 'Labels', 'ggm-commerce' ),
		'type'  => \Elementor\Controls_Manager::HEADING,
	]
);

$this->add_control(
	'label_subtotal',
	[
		'label'   => __( 'Subtotal Label', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => __( 'Subtotal:', 'ggm-commerce' ),
	]
);

$this->add_control(
	'label_tax',
	[
		'label'       => __( 'Tax Label', 'ggm-commerce' ),
		'type'        => \Elementor\Controls_Manager::TEXT,
		'default'     => __( 'Tax', 'ggm-commerce' ),
		'description' => __( 'Used when order has no tax label specified', 'ggm-commerce' ),
	]
);

$this->add_control(
	'label_shipping',
	[
		'label'       => __( 'Shipping Label', 'ggm-commerce' ),
		'type'        => \Elementor\Controls_Manager::TEXT,
		'default'     => __( 'Shipping', 'ggm-commerce' ),
		'description' => __( 'Used when order has no shipping method name', 'ggm-commerce' ),
	]
);

$this->add_control(
	'label_free_shipping',
	[
		'label'   => __( 'Free Shipping Text', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => __( 'Free', 'ggm-commerce' ),
	]
);

$this->add_control(
	'label_order_total',
	[
		'label'   => __( 'Order Total Label', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::TEXT,
		'default' => __( 'Total:', 'ggm-commerce' ),
	]
);

// Styling subsection
$this->add_control(
	'totals_style_heading',
	[
		'label'     => __( 'Styling', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	]
);

$this->add_control(
	'totals_label_color',
	[
		'label'     => __( 'Label Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-totals-label' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'totals_label_typography',
		'label'    => __( 'Label Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-totals-label',
	]
);

$this->add_control(
	'totals_value_color',
	[
		'label'     => __( 'Value Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-totals-value' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'totals_value_typography',
		'label'    => __( 'Value Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-totals-value',
	]
);

$this->add_control(
	'totals_total_heading',
	[
		'label'     => __( 'Final Total Row', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	]
);

$this->add_control(
	'totals_total_background',
	[
		'label'     => __( 'Total Row Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-totals-total' => 'background-color: {{VALUE}};',
		],
	]
);

$this->add_control(
	'totals_total_color',
	[
		'label'     => __( 'Total Row Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-totals-total .ggmc-totals-label, {{WRAPPER}} .ggmc-totals-total .ggmc-totals-value' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'totals_total_typography',
		'label'    => __( 'Total Row Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-totals-total .ggmc-totals-label, {{WRAPPER}} .ggmc-totals-total .ggmc-totals-value',
	]
);

$this->end_controls_section();

// Style Section - Addresses
$this->start_controls_section(
	'section_style_addresses',
	[
		'label' => __( 'Addresses', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	]
);

$this->add_control(
	'address_text_color',
	[
		'label'     => __( 'Text Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-address' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'address_typography',
		'label'    => __( 'Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-address',
	]
);

$this->end_controls_section();

// Style Section - Button
$this->start_controls_section(
	'section_style_button',
	[
		'label'     => __( 'Continue Shopping Button', 'ggm-commerce' ),
		'tab'       => \Elementor\Controls_Manager::TAB_STYLE,
		'condition' => [
			'show_continue_shopping' => 'yes',
		],
	]
);

$this->add_control(
	'button_background',
	[
		'label'     => __( 'Background Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-continue-shopping-btn' => 'background-color: {{VALUE}};',
		],
	]
);

$this->add_control(
	'button_color',
	[
		'label'     => __( 'Text Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-continue-shopping-btn' => 'color: {{VALUE}};',
		],
	]
);

$this->add_control(
	'button_hover_background',
	[
		'label'     => __( 'Hover Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-continue-shopping-btn:hover' => 'background-color: {{VALUE}};',
		],
	]
);

$this->add_control(
	'button_padding',
	[
		'label'      => __( 'Padding', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => [ 'px', 'em' ],
		'selectors'  => [
			'{{WRAPPER}} .ggmc-continue-shopping-btn' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		],
	]
);

$this->add_control(
	'button_border_radius',
	[
		'label'      => __( 'Border Radius', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::DIMENSIONS,
		'size_units' => [ 'px', '%' ],
		'selectors'  => [
			'{{WRAPPER}} .ggmc-continue-shopping-btn' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'button_typography',
		'label'    => __( 'Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-continue-shopping-btn',
	]
);

$this->end_controls_section();

// Style Section - No Order Found
$this->start_controls_section(
	'section_style_no_order',
	[
		'label' => __( 'No Order Found', 'ggm-commerce' ),
		'tab'   => \Elementor\Controls_Manager::TAB_STYLE,
	]
);

// Icon subsection
$this->add_control(
	'no_order_icon_heading',
	[
		'label' => __( 'Icon', 'ggm-commerce' ),
		'type'  => \Elementor\Controls_Manager::HEADING,
	]
);

$this->add_control(
	'no_order_icon_type',
	[
		'label'   => __( 'Icon Type', 'ggm-commerce' ),
		'type'    => \Elementor\Controls_Manager::SELECT,
		'default' => 'warning',
		'options' => [
			'warning'  => __( 'Warning Circle', 'ggm-commerce' ),
			'error'    => __( 'Error X', 'ggm-commerce' ),
			'question' => __( 'Question Mark', 'ggm-commerce' ),
			'search'   => __( 'Search', 'ggm-commerce' ),
			'custom'   => __( 'Custom Icon', 'ggm-commerce' ),
		],
	]
);

$this->add_control(
	'no_order_custom_icon',
	[
		'label'     => __( 'Choose Icon', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::ICONS,
		'default'   => [
			'value'   => 'fas fa-exclamation-circle',
			'library' => 'fa-solid',
		],
		'condition' => [
			'no_order_icon_type' => 'custom',
		],
	]
);

$this->add_control(
	'no_order_icon_color',
	[
		'label'     => __( 'Icon Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-not-found-icon'     => 'color: {{VALUE}};',
			'{{WRAPPER}} .ggmc-order-not-found-icon svg' => 'fill: {{VALUE}}; stroke: {{VALUE}};',
		],
	]
);

$this->add_control(
	'no_order_icon_background',
	[
		'label'     => __( 'Icon Background', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-not-found-icon' => 'background-color: {{VALUE}};',
		],
	]
);

$this->add_control(
	'no_order_icon_size',
	[
		'label'      => __( 'Icon Size', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => [ 'px' ],
		'range'      => [
			'px' => [
				'min' => 24,
				'max' => 120,
			],
		],
		'selectors'  => [
			'{{WRAPPER}} .ggmc-order-not-found-icon'     => 'font-size: {{SIZE}}{{UNIT}};',
			'{{WRAPPER}} .ggmc-order-not-found-icon svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
		],
	]
);

$this->add_control(
	'no_order_icon_box_size',
	[
		'label'      => __( 'Icon Box Size', 'ggm-commerce' ),
		'type'       => \Elementor\Controls_Manager::SLIDER,
		'size_units' => [ 'px' ],
		'range'      => [
			'px' => [
				'min' => 40,
				'max' => 200,
			],
		],
		'selectors'  => [
			'{{WRAPPER}} .ggmc-order-not-found-icon' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
		],
	]
);

// Message subsection
$this->add_control(
	'no_order_message_heading',
	[
		'label'     => __( 'Message', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::HEADING,
		'separator' => 'before',
	]
);

$this->add_control(
	'no_order_message_color',
	[
		'label'     => __( 'Message Color', 'ggm-commerce' ),
		'type'      => \Elementor\Controls_Manager::COLOR,
		'selectors' => [
			'{{WRAPPER}} .ggmc-order-not-found-message' => 'color: {{VALUE}};',
		],
	]
);

$this->add_group_control(
	\Elementor\Group_Control_Typography::get_type(),
	[
		'name'     => 'no_order_message_typography',
		'label'    => __( 'Message Typography', 'ggm-commerce' ),
		'selector' => '{{WRAPPER}} .ggmc-order-not-found-message',
	]
);

$this->end_controls_section();
