<?php
use Elementor\Controls_Manager;

add_action( 'elementor/element/counter/section_counter/before_section_end', function ($element, $args ) {

    $element->add_control(
        'position',
        [
            'label'        => __('Alignment', 'bikys'),
            'type'         => Controls_Manager::CHOOSE,
            'options'      => [
                'left' => [
                    'title' => __('Left', 'bikys'),
                    'icon'  => 'eicon-text-align-left',
                ],
                'center'     => [
                    'title' => __('Center', 'bikys'),
                    'icon'  => 'eicon-text-align-center',
                ],
                'right'   => [
                    'title' => __('Right', 'bikys'),
                    'icon'  => 'eicon-text-align-right',
                ]
            ],
            'toggle'       => false,
            'prefix_class' => 'elementor-position-',
            'default'      => 'center',
            'selectors'    => [
                '{{WRAPPER}} .elementor-counter' => 'text-align: {{VALUE}}',
            ],
        ]
    );
    $element->add_control(
        'decor_number',
        [
            'label'     => esc_html__('Number Decor', 'bikys'),
            'type' => Controls_Manager::SWITCHER,
            'default' => '',
            'prefix_class' => 'decor_number-',
        ]
    );

}, 10, 2 );
