HEX
Server: Apache
System: Linux webd006.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: zwafgyp (177615)
PHP: 7.4.33
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/zwafgyp/lacalita/wp-content/plugins/chaty-pro/src/components/active-widget.js
const $ = window.jQuery;
export default function activeWidgetHandler( button = null ) {
    if($('#active_widget').length) {
        const $triggerBlockWrapper  = $('.trigger-block-wrapper');
        const $disableWidetAlert    = $('.widget-disable-alert');
        const $activeWidgetButton   = $('#active_widget');

        if (button === null) {
            button = $activeWidgetButton[0];
        }

        if (button.checked) {
            $triggerBlockWrapper.show();
            $disableWidetAlert.hide();
        } else {
            $triggerBlockWrapper.hide();
            $disableWidetAlert.show();
        }

        $('#active_widget').on('change', function () {
            activeWidgetHandler(this);
        });
    }
}