import{a as q}from"/_static/app/_shared/chunk-HK5ODV72.js";import{a as D}from"/_static/app/_shared/chunk-2RRGS3QH.js";import{a as V}from"/_static/app/_shared/chunk-N4FUISAI.js";import{a as $}from"/_static/app/_shared/chunk-GUBHTSFL.js";import{e as F,f as C,i as H}from"/_static/app/_shared/chunk-E6THH2FR.js";import"/_static/app/_shared/chunk-VNTBN35C.js";import{a as U}from"/_static/app/_shared/chunk-O5P24SYI.js";import{a as T}from"/_static/app/_shared/chunk-NTPNHULN.js";import"/_static/app/_shared/chunk-GPJW72Y4.js";import"/_static/app/_shared/chunk-EVCBJSRG.js";import"/_static/app/_shared/chunk-2FG7TBRF.js";import{c as y,d as p,q as g,s as l,t as A,v as n,w as B}from"/_static/app/_shared/chunk-MHD5HBT5.js";import{n as u,o as f,v as h}from"/_static/app/_shared/chunk-LYTDOSLZ.js";import"/_static/app/_shared/chunk-T5ZMF7TE.js";import{a as b}from"/_static/app/_shared/chunk-M2P6K7RX.js";import{a as W}from"/_static/app/_shared/chunk-ZT5ASKJB.js";import{b as z,d as a}from"/_static/app/_shared/chunk-YMYSTVXD.js";var L=z(v=>{"use strict";var E=/^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\.?[a-zA-Z0-9])*\.[a-zA-Z](-?[a-zA-Z0-9])+$/;v.validate=function(o){if(!o||o.length>254)return!1;var s=E.test(o);if(!s)return!1;var i=o.split("@");if(i[0].length>64)return!1;var m=i[1].split(".");return!m.some(function(c){return c.length>63})}});var P=a(T(),1);var N=a(L(),1),r=a(W(),1);var Q=a($(),1),j=a(U(),1);var _=a(D(),1);var e=a(b(),1);var I={breadcrumb:"Contact Us"};function K(){let o=C(),s=F(),[i,m]=(0,r.useState)(Boolean(o)),[c,k]=(0,r.useState)(Boolean(s)),[w,x]=(0,r.useState)(!1),[G,R]=(0,r.useState)(!1),[S,Z]=(0,r.useState)(!H()),d=h();return(0,e.jsxs)(g,{className:"usa-section",children:[(0,e.jsx)("h1",{children:"Contact Us"}),d?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("p",{className:"usa-intro",children:"We got your message!"}),(0,e.jsxs)("p",{className:"usa-paragraph",children:['We received your message with subject "',d.subject,'". Shortly, a GCN team member will contact you at the email address that you provided (',d.email,")."]}),(0,e.jsx)(B,{children:(0,e.jsxs)(p,{children:[(0,e.jsx)(u,{to:"/contact",className:"usa-button",children:"Contact us again about something else"}),(0,e.jsx)(u,{to:"/",className:"usa-button usa-button--outline",children:"Go home"})]})})]}):(0,e.jsxs)(f,{method:"POST",children:[(0,e.jsxs)("p",{className:"usa-paragraph",children:["Have you checked if your question is answered in our"," ",(0,e.jsx)(u,{className:"usa-link",to:"/docs/faq",children:"Frequently Asked Questions (FAQ)"}),"?"]}),(0,e.jsx)(n,{htmlFor:"name",children:"What is your name?"}),(0,e.jsx)(l,{id:"name",name:"name",type:"text",required:!0,defaultValue:o,onChange:({target:{value:t}})=>{m(Boolean(t))}}),(0,e.jsx)(n,{htmlFor:"email",children:"What is your email address?"}),(0,e.jsx)(l,{id:"email",name:"email",type:"email",required:!0,defaultValue:s,onChange:({target:{value:t}})=>{k((0,N.validate)(t))}}),(0,e.jsx)(n,{htmlFor:"subject",children:"What is your question about?"}),(0,e.jsx)(l,{id:"subject",name:"subject",type:"text",required:!0,placeholder:"Subject",onChange:({target:{value:t}})=>{x(Boolean(t))}}),(0,e.jsx)(n,{htmlFor:"body",children:"What is your question?"}),(0,e.jsx)(V,{id:"bodyHint",children:"Make sure that you do not include any passwords or client secrets in your message."}),(0,e.jsx)(A,{id:"body",name:"body",required:!0,placeholder:"Body","aria-describedby":"bodyHint",onChange:({target:{value:t}})=>{R(Boolean(t))}}),(0,e.jsx)(q,{onChange:t=>{Z(Boolean(t))}}),(0,e.jsx)(p,{children:(0,e.jsx)(y,{disabled:!(S&&i&&c&&w&&G),type:"submit",children:"Send"})})]})]})}export{K as default,I as handle}; /*! * Copyright © 2023 United States Government as represented by the * Administrator of the National Aeronautics and Space Administration. * All Rights Reserved. * * SPDX-License-Identifier: Apache-2.0 */