<?php
ct_add_custom_widget(
array(
'name' => 'ct_process',
'title' => esc_html__('Case Process', 'consultio'),
'icon' => 'eicon-sitemap',
'categories' => array(Case_Theme_Core::CT_CATEGORY_NAME),
'scripts' => array(
'easy-pie-chart-lib-js',
'ct-piecharts-widget-js',
),
'params' => array(
'sections' => array(
array(
'name' => 'section_content',
'label' => esc_html__('Process', 'consultio'),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
'controls' => array(
array(
'name' => 'layout',
'label' => esc_html__('Layout', 'consultio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'1' => 'Layout 1',
'2' => 'Layout 2',
'3' => 'Layout 3',
'4' => 'Layout 4',
],
'default' => '1',
),
array(
'name' => 'content_list',
'label' => esc_html__('Process', 'consultio'),
'type' => \Elementor\Controls_Manager::REPEATER,
'controls' => array(
array(
'name' => 'ct_icon',
'label' => esc_html__('Icon', 'consultio' ),
'type' => \Elementor\Controls_Manager::ICONS,
'fa4compatibility' => 'icon',
'default' => [
'value' => 'fas fa-star',
'library' => 'fa-solid',
],
),
array(
'name' => 'title',
'label' => esc_html__('Title', 'consultio'),
'type' => \Elementor\Controls_Manager::TEXT,
'label_block' => true,
),
array(
'name' => 'description',
'label' => esc_html__('Description', 'consultio'),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'label_block' => true,
),
array(
'name' => 'btn_text',
'label' => esc_html__('Button Text', 'consultio'),
'type' => \Elementor\Controls_Manager::TEXT,
),
array(
'name' => 'btn_link',
'label' => esc_html__('Button Link', 'consultio'),
'type' => \Elementor\Controls_Manager::URL,
),
),
'title_field' => '{{{ title }}}',
),
array(
'name' => 'column',
'label' => esc_html__('Column', 'consultio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
],
'default' => '4',
),
),
),
array(
'name' => 'section_style',
'label' => esc_html__('Style', 'consultio' ),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
'controls' => array(
array(
'name' => 'style_l3',
'label' => esc_html__('Style', 'consultio' ),
'type' => \Elementor\Controls_Manager::SELECT,
'options' => [
'style-1' => 'Style 1',
'style-2' => 'Style 2',
],
'default' => 'style-1',
'condition' => [
'layout' => '3',
],
),
array(
'name' => 'gradient_color_from',
'label' => esc_html__('Gradient Color From', 'consultio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ct-process' => '--gradient-color-from: {{VALUE}};',
],
'condition' => [
'layout' => '3',
'style_l3' => 'style-2',
],
),
array(
'name' => 'gradient_color_to',
'label' => esc_html__('Gradient Color To', 'consultio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ct-process' => '--gradient-color-to: {{VALUE}};',
],
'condition' => [
'layout' => '3',
'style_l3' => 'style-2',
],
),
array(
'name' => 'line_image',
'label' => esc_html__('Line Image', 'consultio' ),
'type' => \Elementor\Controls_Manager::MEDIA,
'condition' => [
'layout' => '1',
],
),
array(
'name' => 'icon_color',
'label' => esc_html__('Icon Color', 'consultio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ct-process1.style2 .ct-process-icon' => 'color: {{VALUE}};',
],
'condition' => [
'layout' => '2',
],
),
array(
'name' => 'title_color',
'label' => esc_html__('Title Color', 'consultio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ct-process .ct-process-title' => 'color: {{VALUE}};',
],
),
array(
'name' => 'title_typography',
'label' => esc_html__('Title Typography', 'consultio' ),
'type' => \Elementor\Group_Control_Typography::get_type(),
'control_type' => 'group',
'selector' => '{{WRAPPER}} .ct-process .ct-process-title',
),
array(
'name' => 'description_color',
'label' => esc_html__('Description Color', 'consultio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ct-process .ct-process-description' => 'color: {{VALUE}};',
],
),
array(
'name' => 'description_typography',
'label' => esc_html__('Description Typography', 'consultio' ),
'type' => \Elementor\Group_Control_Typography::get_type(),
'control_type' => 'group',
'selector' => '{{WRAPPER}} .ct-process .ct-process-description',
),
array(
'name' => 'box_bg_color',
'label' => esc_html__('Box Background Color', 'consultio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ct-process1.style2 .ct-piechart-process .ct-process-border::before' => 'background-color: {{VALUE}};',
],
'condition' => [
'layout' => '2',
],
),
array(
'name' => 'box_border_color',
'label' => esc_html__('Box Border Color', 'consultio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'selectors' => [
'{{WRAPPER}} .ct-process1.style2 .ct-piechart-process .ct-process-border::before' => 'border-color: {{VALUE}};',
],
'condition' => [
'layout' => '2',
],
),
array(
'name' => 'bar_color',
'label' => esc_html__('Bar Color', 'consultio' ),
'type' => \Elementor\Controls_Manager::COLOR,
'condition' => [
'layout' => ['2','4'],
],
),
array(
'name' => 'number_typography',
'label' => esc_html__('Number Typography', 'consultio' ),
'type' => \Elementor\Group_Control_Typography::get_type(),
'control_type' => 'group',
'selector' => '{{WRAPPER}} .ct-process .ct-process-number',
'condition' => [
'layout' => ['4'],
],
),
),
),
),
),
),
get_template_directory() . '/elementor/core/widgets/'
);