//- https://chatra.io/help/api/
script.
  (function(d, w, c) {
      w.ChatraID = '#{theme.chatra.id}';
      var s = d.createElement('script');
      w[c] = w[c] || function() {
          (w[c].q = w[c].q || []).push(arguments);
      };
      s.async = true;
      s.src = 'https://call.chatra.io/chatra.js';
      if (d.head) d.head.appendChild(s);
  })(document, window, 'Chatra');

  if (!{theme.chat_btn}) {
    var chatBtnFn = () => {
      var chatBtn = document.getElementById("chat_btn")
      chatBtn.addEventListener("click", function(){
        Chatra('openChat')
      });
    }
    chatBtnFn()
  } else {
    if (!{theme.chat_hide_show}) {
      function chatBtnHide () {
        Chatra('hide')
      }
      function chatBtnShow () {
        Chatra('show')
      }
    }
  }


