"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[337],{70337:function(e,n,t){t.r(n);var i=t(85893),s=t(34067),r=t(9008),d=t.n(r),o=t(67294),w=t(25564),c=t(71486),h=t(6383);let a={width:"100%",border:"2px solid rgba(0, 0, 0, 0.23)",fontWeight:"700"};n.default=e=>{let{data:n,country:t,language:r}=e,u=(0,w.K1)(n,"groupId",t,r),g=(0,w.K1)(n,"widgetId",t,r),{t:l}=(0,c.Z)();return g&&g.value&&!(g.value.length<5)&&(0,w.C5)()?((0,o.useEffect)(()=>{window.FreshworksWidget&&(window.FreshworksWidget("hide"),window.FreshworksWidget("hide","launcher"))},[window.FreshworksWidget]),(0,o.useEffect)(()=>function(){window.FreshworksWidget("hide"),window.FreshworksWidget("hide","launcher")},[]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(d(),{children:[(0,i.jsx)("script",{type:"text/javascript",dangerouslySetInnerHTML:{__html:"\n            window.fwSettings = {\n              'widget_id': ".concat(g.value,",\n              'locale': '").concat((0,w.dD)(h.constants.LANGUAGE),"'\n            };\n              !function() {\n                if ('function' != typeof window.FreshworksWidget ) {\n                  const n = function() {\n                    n.q.push(arguments);\n                  };\n                  n.q = [], window.FreshworksWidget=n;\n                  window.FreshworksWidget('hide', 'launcher');\n                }\n              }();\n            ")}}),(0,i.jsx)("script",{type:"text/javascript",src:"https://euc-widget.freshworks.com/widgets/".concat(g.value,".js"),async:!0,defer:!0})]}),(0,i.jsx)(s.Z,{size:"large",sx:a,variant:"outlined",onClick:()=>{window&&window.FreshworksWidget&&(window.FreshworksWidget("open"),window.FreshworksWidget("hide","launcher"),u&&window.FreshworksWidget("prefill","ticketForm",{group_id:parseInt(u.value,10)}),window.FreshworksWidget("hide","ticketForm",["group_id"]))},children:l("Contact us")})]})):(0,i.jsx)(i.Fragment,{})}}}]);