1import{r as n,u as C,j as e,S as h,g as z,T as i,s as r,L as o,B as N,ag as I}from"./index-B1JCX_-d.js";import{T as f}from"./TextInput-D-E7ywd3.js";import{S as P}from"./Select-81cxwBve.js";import{L as a}from"./List-Bq6CPE7n.js";import{T as H}from"./Textarea-S6TImZwF.js";import"./InputBase-CWPbF_yb.js";import"./get-env-uyVen0u2.js";const j="6LczwcQZAAAAADgnx95WcLbRCMFLDSoH6zRGvArt";function G(){const[u,b]=n.useState(""),[c,y]=n.useState(""),[s,w]=n.useState(""),[d,q]=n.useState(""),[v,p]=n.useState(!1),[l,T]=n.useState({}),m=C();n.useEffect(()=>{const t=document.createElement("script");return t.src=`https://www.google.com/recaptcha/api.js?render=${j}`,t.async=!0,document.head.appendChild(t),()=>{document.head.removeChild(t)}},[]);const g=s&&s!==""&&s!=="change-admin",S=()=>{const t={};return u.trim()||(t.name="Name is required"),c.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c)||(t.email="Please enter a valid email address"):t.email="Email is required",s||(t.enquiryNature="Enquiry type is required"),g&&!d.trim()&&(t.description="Description is required"),T(t),Object.keys(t).length===0},k=async t=>{if(t.preventDefault(),!!S()){p(!0);try{const x=await new Promise((E,A)=>{window.grecaptcha.ready(()=>{window.grecaptcha.execute(j,{action:"contact"}).then(E).catch(A)})});await I.post("/contact/",{name:u,email:c,nature:s,description:d,recaptcha_token:x}),m("/thankyou/?origin=contact")}catch{m("/thankyou/?origin=contact&error=true")}finally{p(!1)}}};return e.jsxs(h,{gap:"lg",children:[e.jsxs(z,{order:1,size:"h2",children:["Contact Us",e.jsx(i,{size:"sm",c:"dimmed",fw:400,mt:4,children:"How can we help? Here's how to reach us."})]}),e.jsx("form",{onSubmit:k,children:e.jsxs(h,{gap:"md",children:[e.jsx(f,{label:"Name",placeholder:"Name",size:"md",required:!0,value:u,onChange:t=>b(t.currentTarget.value),error:l.name}),e.jsx(f,{label:"Email Address",type:"email",placeholder:"Email Address",size:"md",required:!0,value:c,onChange:t=>y(t.currentTarget.value),error:l.email}),e.jsx(P,{label:"What is the nature of your enquiry?",size:"md",placeholder:"Select enquiry type",required:!0,value:s,onChange:w,error:l.enquiryNature,data:[{value:"pricing",label:"Pricing / subscription related"},{value:"change-admin",label:"Change the administrator"},{value:"workflow-setup",label:"Setting up your workflow"},{value:"troubleshooting",label:"Issues / troubleshooting"}]}),s==="pricing"&&e.jsxs(i,{children:["The best resource for pricing / plan related enquiries is our"," ",e.jsx(r,{component:o,to:"/pricing/",children:"pricing page"}),". Our pricing page also includes frequently asked questions at the bottom of the page."]}),s==="change-admin"&&e.jsxs(i,{children:["The best resource for changing the administrator is this"," ",e.jsx(r,{component:o,to:"/support/faq/#change-administrator",children:"frequently asked question"}),". This FAQ has all steps required to change the administrator. Please note, we cannot change the administrator on your behalf."]}),s==="workflow-setup"&&e.jsxs(i,{children:["The best resources for setting up your workflow are our"," ",e.jsx(r,{component:o,to:"/support/",children:"support articles"})," and"," ",e.jsx(r,{href:"https://youtube.com/watch?v=eXdbUwzqI6s",target:"_blank",rel:"noopener noreferrer",children:"video tutorial"}),"."]}),s==="troubleshooting"&&e.jsxs(h,{gap:"xs",children:[e.jsxs(i,{children:["As a first step, please refer to our"," ",e.jsx(r,{component:o,to:"/support/troubleshooting/",children:"troubleshooting articles"})," and"," ",e.jsx(r,{component:o,to:"/support/faq/",children:"frequently asked questions"}),". The most common questions include:"]}),e.jsxs(a,{children:[e.jsx(a.Item,{children:e.jsxs(r,{component:o,to:"/support/troubleshooting/#recipient-issue",children:["The add-on is not sending notifications to ",e.jsx("u",{children:"recipients"})]})}),e.jsx(a.Item,{children:e.jsxs(r,{component:o,to:"/support/troubleshooting/#requestor-issue",children:["The add-on is not sending notifications to ",e.jsx("u",{children:"requestors"})]})}),e.jsx(a.Item,{children:e.jsx(r,{component:o,to:"/support/troubleshooting/#multiple-accounts-issue",children:"The add-on sidebar is displaying a server error, blank screen or 'drive refused to connect'"})}),e.jsx(a.Item,{children:e.jsx(r,{component:o,to:"/support/troubleshooting/#menu-issue",children:"Only the Help menu item displays when trying to open the add-on"})}),e.jsx(a.Item,{children:e.jsx(r,{component:o,to:"/support/troubleshooting/#form-responses-sheet-issue",children:"Notifications are missing information or information is in the wrong order"})})]})]}),g&&e.jsxs(e.Fragment,{children:[e.jsx(H,{label:"How can we help?",size:"md",placeholder:"Enter your question...",required:!0,rows:4,value:d,onChange:t=>q(t.currentTarget.value),error:l.description}),e.jsx(N,{type:"submit",color:"brand",loading:v,children:"Submit"}),e.jsxs(i,{size:"xs",c:"dimmed",ta:"center",children:["This site is protected by reCAPTCHA and the Google"," ",e.jsx(r,{href:"https://policies.google.com/privacy",target:"_blank",rel:"noopener noreferrer",size:"xs",children:"Privacy Policy"})," and"," ",e.jsx(r,{href:"https://policies.google.com/terms",target:"_blank",rel:"noopener noreferrer",size:"xs",children:"Terms of Service"})," apply."]})]})]})})]})}export{G 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.