/* Minification failed. Returning unminified contents.
(15,20-21): run-time error JS1195: Expected expression: )
(15,23-24): run-time error JS1195: Expected expression: >
(16,42-43): run-time error JS1195: Expected expression: )
(16,45-46): run-time error JS1195: Expected expression: >
(19,5-6): run-time error JS1002: Syntax error: }
(21,98-99): run-time error JS1195: Expected expression: )
(21,100-101): run-time error JS1004: Expected ';': {
(25,6-7): run-time error JS1195: Expected expression: )
(18,9-21): run-time error JS1018: 'return' statement outside of function: return false
 */
window.channelsCB = function () {
    ChannelsWidget.init({
        companyId: 'i14778026796',
        lang: 'uk',
        palette: {
            primaryColor: '#74B027'
        }
    });
}

window.changeWidgetLang = function (lang) {
    ChannelsWidget.setLang(lang);
}

$(document).ready(() => {
    $("body").on("click", ".hd-action", () => {
        ChannelsWidget.toggle();
        return false;
    });

    $("body").on("click", ":not(.sender-wrapper):not(.widget-button):not(.hd-action)", function () {
        if ($(this).parents(".sender-wrapper,.widget-button,.hd-action").length == 0) {
            ChannelsWidget.toggle(false);
        }
    });
});;
