1import{j as e,a3 as I,n as m,aT as z,f as y,w as B,bO as M,r as l,ao as v,aP as L,t as O,c as u,a0 as _,M as b,B as Q,aQ as W,aR as G,d as Y,Q as q,bP as H,aS as J}from"./index-BqKviU6K.js";import{P as K,a as V}from"./Person-CrXd_uKz.js";import{E as X,P as Z}from"./Phone-DCK0tzoP.js";const n=a=>e.jsxs(y,{sx:{flexDirection:"row",gap:1,alignItems:"center",py:.25,wordBreak:"break-word"},children:[a.icon,a.text&&e.jsx(m,{sx:{color:"#fff"},children:a.text}),a.children]}),$=a=>{const{index:c,item:o}=a;return e.jsxs(I,{sx:{px:3,py:2,textAlign:"left"},children:[o.NameCompany&&e.jsx(m,{variant:"h6",mb:.5,children:o.NameCompany}),e.jsx(n,{icon:e.jsx(K,{fontSize:"small"}),text:o.Contact}),e.jsx(n,{icon:e.jsx(X,{fontSize:"small"}),children:e.jsx("a",{href:"mailto:"+o.Email,children:o.Email})}),o.PhoneNumber&&e.jsx(n,{icon:e.jsx(Z,{fontSize:"small"}),children:e.jsx("a",{href:"tel:"+o.PhoneNumber,children:o.PhoneNumber})}),o.Address&&e.jsx(n,{icon:e.jsx(V,{fontSize:"small"}),text:o.Address}),o.Url&&e.jsx(n,{icon:e.jsx(z,{fontSize:"small"}),children:e.jsx("a",{href:o.Url,target:"_blank",rel:"noopener noreferrer",children:o.Url})})]},c)},se=a=>{const c=B(),o=M(),{selectedProduct:i}=a,[C,d]=l.useState({country:"",state:""}),h=v(),[x,S]=l.useState([]),{recaptchaToken:f,handleTokenChange:N}=L(),A=t=>{S(t)},[E]=O(["country_code"]),j=E.country_code?.toUpperCase(),r=u(t=>t.accountReducer.userInfo),p=u(t=>t.accountReducer.isAccountAuthenticated),P=u(t=>t.dataCountriesReducer);l.useEffect(()=>{if(i||c(h("/store"),{replace:!0}),!p){const t=P.countries.find(s=>s.COUNTRYCODE.toUpperCase()===j);t&&d({...C,country:t.DISPLAY})}},[]);const R=t=>{const{name:s,email:g,phone:k,comments:U,country:w,state:D,organization:F}=t;return{generalForm:{userInfo:r?.rjoelegible?{FirstName:r.FirstName,LastName:r.LastName,Email:r.Email,PhoneNumber:r.BillToAccountObj?.PhoneNumber||"",AccountNumber:r.BillToAccount,rjoelegible:r.rjoelegible}:{FirstName:s,Email:g,PhoneNumber:k,...r?.BillToAccount&&{AccountNumber:r.BillToAccount}},comments:U,country:w,state:D,organization:F,dealersToSendEmail:x},formSource:i,recaptchaToken:J(f)}},T=async t=>{try{const s=R(t);if((await G(s)).formSource)return Y.gtag("event","form_submission"),q.success(e.jsx(b,{id:"notification.messageSent"})),c(h("/confirmation-email-sent"),{replace:!0});throw new Error}catch(s){H(s,o)}};return e.jsxs(_,{"data-cy":"contactus-container",children:[e.jsx(m,{component:"h1",variant:"h2",sx:{mb:5},children:e.jsx(b,{id:"common.contactUs"})}),e.jsxs(Q,{"data-gtm-click-section":i,sx:{display:"grid",gridTemplateColumns:{xs:"1fr",md:"3fr 2fr"},gap:6},children:[e.jsx(W,{onSubmit:T,userInfo:r,cookieCountryCode:j,isAccountAuthenticated:p,setUserCountry:d,handleTokenChange:N,recaptchaToken:f,handleDealers:A}),e.jsx(y,{gap:2,children:x.map((t,s)=>e.jsx($,{index:s,item:t},s))})]})]})};export{se as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.