<?php
pxl_add_custom_widget(
    array(
        'name' => 'pxl_navigation_carousel',
        'title' => esc_html__('Case Navigation Carousel', 'solarva' ),
        'icon' => 'eicon-post-navigation',
        'categories' => array('pxltheme-core'),
        'params' => array(
            'sections' => array(
                array(
                    'name' => 'tab_style',
                    'label' => esc_html__('Style', 'solarva' ),
                    'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
                    'controls' => array(
                        array(
                            'name' => 'justify_content_h',
                            'label' => esc_html__('Justify Content', 'solarva' ),
                            'type' => \Elementor\Controls_Manager::CHOOSE,
                            'control_type' => 'responsive', 
                            'label_block' => true,
                            'options' => [
                                'start' =>  [
                                    'title' => esc_html__('Start', 'solarva'),
                                    'icon' => 'eicon-align-start-h',
                                ],
                                'center' =>  [
                                    'title' => esc_html__('Center', 'solarva'),
                                    'icon' => 'eicon-align-center-h',
                                ],
                                'end' =>  [
                                    'title' => esc_html__('End', 'solarva'),
                                    'icon' => 'eicon-align-end-h',
                                ],
                                'space-around' =>  [
                                    'title' => esc_html__('Space Around', 'solarva'),
                                    'icon' => 'eicon-justify-space-around-h',
                                ],
                                'space-between' =>  [
                                    'title' => esc_html__('Space Between', 'solarva'),
                                    'icon' => 'eicon-justify-space-between-h',
                                ],
                                'space-evenly' =>  [
                                    'title' => esc_html__('Space Evenly', 'solarva'),
                                    'icon' => 'eicon-justify-space-evenly-h',
                                ],
                            ],
                            'selectors' => [
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows' => 'justify-content: {{VALUE}};'
                            ],
                        ),
                        array(
                            'name' => 'width',
                            'label' => esc_html__('Width', 'solarva'),
                            'type' => \Elementor\Controls_Manager::SLIDER,
                            'size_units' => ['px', '%', 'rem', 'em', 'custom'],
                            'control_type' => 'responsive',
                            'separator' => 'before',
                            'range' => [
                                'px' => [
                                    'min' => 0,
                                    'max' => 1000,
                                ],
                            ],
                            'selectors' => [
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow' => 'width: {{SIZE}}{{UNIT}};',
                            ],
                        ),
                        array(
                            'name' => 'height',
                            'label' => esc_html__('Height', 'solarva'),
                            'type' => \Elementor\Controls_Manager::SLIDER,
                            'size_units' => ['px', '%', 'rem', 'em', 'custom'],
                            'control_type' => 'responsive',
                            'separator' => 'before',
                            'range' => [
                                'px' => [
                                    'min' => 0,
                                    'max' => 1000,
                                ],
                            ],
                            'selectors' => [
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow' => 'height: {{SIZE}}{{UNIT}};',
                            ],
                        ),
                        array(
                            'name' => 'color',
                            'label' => esc_html__('Color', 'solarva'),
                            'type' => \Elementor\Controls_Manager::COLOR,
                            'selectors' => [
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow' => 'color: {{VALUE}};',
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow svg path, 
                                {{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow svg rect' => 'fill: {{VALE}};',
                            ],
                        ),
                        array(
                            'name' => 'bg_color',
                            'label' => esc_html__('Background Color', 'solarva'),
                            'type' => \Elementor\Controls_Manager::COLOR,
                            'selectors' => [
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow' => 'background-color: {{VALUE}};',
                            ],
                        ),
                        array(
                            'name'         => 'btn_border',
                            'label' => esc_html__( 'Border', 'solarva' ),
                            'type'         => \Elementor\Group_Control_Border::get_type(),
                            'control_type' => 'group',
                            'selector'     => '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow',
                        ),
                        array(
                            'name' => 'gap',
                            'label' => esc_html__('Gap', 'solarva'),
                            'type' => \Elementor\Controls_Manager::SLIDER,
                            'size_units' => ['px', '%', 'rem', 'em', 'custom'],
                            'control_type' => 'responsive',
                            'separator' => 'before',
                            'range' => [
                                'px' => [
                                    'min' => 0,
                                    'max' => 1000,
                                ],
                            ],
                            'selectors' => [
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows' => 'gap: {{SIZE}}{{UNIT}};',
                            ],
                        ),
                        array(
                            'name' => 'border_radius',
                            'label' => esc_html__( 'Border Radius', 'solarva' ),
                            'type' => \Elementor\Controls_Manager::DIMENSIONS,
                            'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
                            'control_type' => 'responsive',
                            'separator' => 'after',
                            'selectors' => [
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                            ],
                        ),

                        array(
                            'name' => 'hover',
                            'label' => esc_html__('HOVER', 'solarva'),
                            'type' => \Elementor\Controls_Manager::HEADING,
                        ),
                        array(
                            'name' => 'color_hover',
                            'label' => esc_html__('Color', 'solarva'),
                            'type' => \Elementor\Controls_Manager::COLOR,
                            'selectors' => [
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow:hover' => 'color: {{VALUE}};',
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow:hover svg path, 
                                {{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow:hover svg rect' => 'fill: {{VALE}};',
                            ],
                        ),
                        array(
                            'name' => 'bg_color_hover',
                            'label' => esc_html__('Background Color', 'solarva'),
                            'type' => \Elementor\Controls_Manager::COLOR,
                            'selectors' => [
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow:hover' => 'background-color: {{VALUE}};',
                            ],
                        ),
                        array(
                            'name' => 'border_radius_hover',
                            'label' => esc_html__( 'Border Radius', 'solarva' ),
                            'type' => \Elementor\Controls_Manager::DIMENSIONS,
                            'size_units' => [ 'px', '%', 'em', 'rem', 'custom' ],
                            'control_type' => 'responsive',
                            'separator' => 'after',
                            'selectors' => [
                                '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                            ],
                        ),
                        array(
                            'name'         => 'btn_border_hover',
                            'label' => esc_html__( 'Border', 'solarva' ),
                            'type'         => \Elementor\Group_Control_Border::get_type(),
                            'control_type' => 'group',
                            'selector'     => '{{WRAPPER}} .pxl-navigation-carousel .pxl-swiper-arrows .pxl-swiper-arrow:hover',
                        ),
                    ),
                ),
                solarva_widget_animation_settings(),
            ),
        ),
    ),
    solarva_get_class_widget_path()
);