<?php
pxl_add_custom_widget(
    array(
        'name' => 'pxl_history',
        'title' => esc_html__('BR History', 'breeza'),
        'icon' => 'eicon-editor-link',
        'categories' => array('pxltheme-core'),
        'params' => array(
            'sections' => array(
             array(
                'name' => 'section_layout',
                'label' => esc_html__('Layout', 'breeza' ),
                'tab' => \Elementor\Controls_Manager::TAB_LAYOUT,
                'controls' => array(
                    array(
                        'name' => 'layout',
                        'label' => esc_html__('Templates', 'breeza' ),
                        'type' => 'layoutcontrol',
                        'default' => '1',

                        'options' => [
                            '1' => [
                                'label' => esc_html__('Layout 1', 'breeza' ),
                                'image' => get_template_directory_uri() . '/elements/widgets/img-layout/pxl_history/layout1.jpg'
                            ],
                            '2' => [
                                'label' => esc_html__('Layout 2', 'breeza' ),
                                'image' => get_template_directory_uri() . '/elements/widgets/img-layout/pxl_history/layout2.jpg'
                            ],
                        ],
                    ),
                ),
            ),
             array(
                'name' => 'section_content_2',
                'label' => esc_html__('Content', 'breeza'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                'condition' => [
                    'layout' => ['1'],
                ],
                'controls' => array(
                    array(
                        'name' => 'history_2',
                        'label' => esc_html__('List', 'breeza'),
                        'type' => \Elementor\Controls_Manager::REPEATER,
                        'controls' => array(
                          array(
                            'name' => 'number_2',
                            'label' => esc_html__('Number', 'breeza'),
                            'type' => \Elementor\Controls_Manager::TEXTAREA,
                            'label_block' => true,
                        ),
                          array(
                            'name' => 'text_2',
                            'label' => esc_html__('Title', 'breeza'),
                            'type' => \Elementor\Controls_Manager::TEXTAREA,
                            'label_block' => true,
                        ),
                          array(
                            'name' => 'decs_2',
                            'label' => esc_html__('Description', 'breeza'),
                            'type' => \Elementor\Controls_Manager::TEXTAREA,
                            'label_block' => true,
                        ),

                      ),
                        'title_field' => '{{{ text_2 }}}',
                    ),
                ),
            ),
             array(
                'name' => 'section_content_1',
                'label' => esc_html__('Content', 'breeza'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                'condition' => [
                    'layout' => ['2'],
                ],
                'controls' => array(
                    array(
                        'name' => 'history_1',
                        'label' => esc_html__('List', 'breeza'),
                        'type' => \Elementor\Controls_Manager::REPEATER,
                        'controls' => array(
                            array(
                                'name' => 'image1',
                                'label' => esc_html__('Image', 'breeza' ),
                                'type' => \Elementor\Controls_Manager::MEDIA,
                            ),
                            array(
                                'name' => 'number_1',
                                'label' => esc_html__('Number', 'breeza'),
                                'type' => \Elementor\Controls_Manager::TEXTAREA,
                                'label_block' => true,
                            ),
                            array(
                                'name' => 'text_1',
                                'label' => esc_html__('Title', 'breeza'),
                                'type' => \Elementor\Controls_Manager::TEXTAREA,
                                'label_block' => true,
                            ),
                            array(
                                'name' => 'decs_1',
                                'label' => esc_html__('Description', 'breeza'),
                                'type' => \Elementor\Controls_Manager::TEXTAREA,
                                'label_block' => true,
                            ),

                        ),
                        'title_field' => '{{{ text_1 }}}',
                    ),
                ),
            ),
             array(
                'name' => 'section_style_subtitle',
                'label' => esc_html__('Subtitle', 'breeza'),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
                'condition' => [
                    'layout' => ['2'],
                ],
                'controls' => array(
                    array(
                        'name' => 'subtitle_typography',
                        'label' => esc_html__('Title Typography', 'breeza' ),
                        'type' => \Elementor\Group_Control_Typography::get_type(),
                        'control_type' => 'group',
                        'selector' => '{{WRAPPER}} .pxl-history .subtitle',
                    ),
                    array(
                        'name' => 'subtitle_color',
                        'label' => esc_html__('Description Color ', 'breeza' ),
                        'type' => \Elementor\Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} .pxl-history .subtitle' => 'color: {{VALUE}};',
                        ],
                    ),
                ),
            ),
             array(
                'name' => 'section_style_title',
                'label' => esc_html__('Title', 'breeza'),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
                'controls' => array(
                    array(
                        'name' => 'title_typography',
                        'label' => esc_html__('Title Typography', 'breeza' ),
                        'type' => \Elementor\Group_Control_Typography::get_type(),
                        'control_type' => 'group',
                        'selector' => '{{WRAPPER}} .pxl-history .title',
                    ),
                    array(
                        'name' => 'title_color',
                        'label' => esc_html__('Title Color ', 'breeza' ),
                        'type' => \Elementor\Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} .pxl-history .title' => 'color: {{VALUE}};',
                        ],
                    ),
                ),
            ),
             array(
                'name' => 'section_style_ic',
                'label' => esc_html__('Icon', 'breeza'),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
                'controls' => array(
                    array(
                        'name' => 'ic_color',
                        'label' => esc_html__('Icon Color ', 'breeza' ),
                        'type' => \Elementor\Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} .pxl-history i' => 'color: {{VALUE}};',
                            '{{WRAPPER}} .pxl-history .icon' => 'color: {{VALUE}};',
                            '{{WRAPPER}} .pxl-history svg path' => 'fill: {{VALUE}};',
                        ],
                    ),
                    array(
                        'name' => 'ic_color_hover',
                        'label' => esc_html__('Icon Color Hover', 'breeza' ),
                        'type' => \Elementor\Controls_Manager::COLOR,
                        'selectors' => [
                            '{{WRAPPER}} .pxl-history .wrap-content:hover i' => 'color: {{VALUE}};',
                            '{{WRAPPER}} .pxl-history .wrap-content:hover .icon' => 'color: {{VALUE}};',
                            '{{WRAPPER}} .pxl-history .wrap-content:hover svg path' => 'fill: {{VALUE}};',
                        ],
                    ),
                    array(
                        'name' => 'background_color',
                        'label' => esc_html__('Icon Background ', 'breeza' ),
                        'type' => \Elementor\Controls_Manager::COLOR,
                        'selectors' => [                            
                            '{{WRAPPER}} .pxl-history .icon' => 'background-color: {{VALUE}};',                            
                        ],
                    ),
                    array(
                        'name' => 'background_color_hover',
                        'label' => esc_html__('Icon Background Hover', 'breeza' ),
                        'type' => \Elementor\Controls_Manager::COLOR,
                        'selectors' => [                            
                            '{{WRAPPER}} .pxl-history .wrap-content:hover .icon' => 'background-color: {{VALUE}};',                            
                        ],
                    ),
                    array(
                        'name' => 'background_color_jante',
                        'label' => esc_html__('Icon Background Jante', 'breeza' ),
                        'type' => \Elementor\Controls_Manager::COLOR,
                        'selectors' => [                            
                            '{{WRAPPER}} .pxl-history .icon:before' => 'background-color: {{VALUE}};',                            
                        ],
                    ),
                    array(
                        'name' => 'background_color_jante_hover',
                        'label' => esc_html__('Icon Background Jante Hover', 'breeza' ),
                        'type' => \Elementor\Controls_Manager::COLOR,
                        'selectors' => [                            
                            '{{WRAPPER}} .pxl-history .icon:hover:before' => 'background-color: {{VALUE}};',                            
                        ],
                    ),
                    array(
                        'name' => 'border_type',
                        'label' => esc_html__( 'Border Type', 'breeza' ),
                        'type' => \Elementor\Controls_Manager::SELECT,
                        'options' => [
                            '' => esc_html__( 'None', 'breeza' ),
                            'solid' => esc_html__( 'Solid', 'breeza' ),
                            'double' => esc_html__( 'Double', 'breeza' ),
                            'dotted' => esc_html__( 'Dotted', 'breeza' ),
                            'dashed' => esc_html__( 'Dashed', 'breeza' ),
                            'groove' => esc_html__( 'Groove', 'breeza' ),
                        ],
                        'selectors' => [
                            '{{WRAPPER}} .pxl-history .icon' => 'border-style: {{VALUE}};',
                        ],
                    ),
                    array(
                        'name' => 'border_width',
                        'label' => esc_html__( 'Border Width', 'breeza' ),
                        'type' => \Elementor\Controls_Manager::DIMENSIONS,
                        'selectors' => [
                            '{{WRAPPER}} .pxl-history .icon' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                        ],
                        'condition' => [
                            'border_type!' => '',
                        ],
                        'responsive' => true,
                    ),
                    array(
                        'name' => 'border_color',
                        'label' => esc_html__( 'Border Color', 'breeza' ),
                        'type' => \Elementor\Controls_Manager::COLOR,
                        'default' => '',
                        'selectors' => [
                            '{{WRAPPER}} .pxl-history .icon' => 'border-color: {{VALUE}};',
                        ],
                        'condition' => [
                            'border_type!' => '',
                        ],
                    ),
                ),
),
array(
    'name' => 'section_style_desc',
    'label' => esc_html__('Description', 'breeza'),
    'tab' => \Elementor\Controls_Manager::TAB_STYLE,
    'controls' => array(
        array(
            'name' => 'desc_typography',
            'label' => esc_html__('Description Typography', 'breeza' ),
            'type' => \Elementor\Group_Control_Typography::get_type(),
            'control_type' => 'group',
            'selector' => '{{WRAPPER}} .pxl-history .desc',
        ),
        array(
            'name' => 'desc_color',
            'label' => esc_html__('Description Color ', 'breeza' ),
            'type' => \Elementor\Controls_Manager::COLOR,
            'selectors' => [
                '{{WRAPPER}} .pxl-history .desc' => 'color: {{VALUE}};',
            ],
        ),
    ),
),
breeza_widget_animation_settings(),
),
),
),
breeza_get_class_widget_path()
);