1import{r as a,j as t}from"./index-DJqYQI6A.js";import{L as C}from"./LegalPageLayout-STB-lU2a.js";import"./PageFooterRow-BoOeDSrM.js";import"./HeroBanner-C9heXPr0.js";import"./slugLabel-G8ALJ0WS.js";import"./pageApi-DLVvI3Qb.js";const p=["General","Website / Technical","Accessibility","Content","Complaint"],x={name:"Name",email:"Email",message:"Message"},F=o=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o.trim()),A=()=>{const[o,y]=a.useState(""),[l,k]=a.useState(""),[m,j]=a.useState(p[0]),[d,w]=a.useState(""),[N,h]=a.useState(!1),[s,f]=a.useState({}),g=a.useRef(null),v=()=>{const e={};return o.trim()||(e.name="Enter your name."),l.trim()?F(l)||(e.email="Enter an email address in the format [email protected], so we can reply."):e.email="Enter your email address.",d.trim()||(e.message="Enter your feedback so we know what to look into."),e},E=e=>{e.preventDefault();const r=v();if(f(r),Object.keys(r).length>0){h(!1),window.requestAnimationFrame(()=>g.current?.focus());return}const i=`[Website Feedback] ${m}`,S=`Name: ${o} 2Email: ${l} 3Category: ${m} 4 5Message: 6${d} 7`;window.location.href=`mailto:[email protected]?subject=${encodeURIComponent(i)}&body=${encodeURIComponent(S)}`,h(!0)},c=e=>f(r=>{if(!r[e])return r;const i={...r};return delete i[e],i}),u=e=>({"aria-invalid":s[e]?!0:void 0,"aria-describedby":s[e]?`feedback-${e}-error`:void 0}),b=e=>s[e]?t.jsx("p",{id:`feedback-${e}-error`,className:"mt-1 text-sm font-medium text-[#b00020]",children:s[e]}):null,n=Object.keys(x).filter(e=>s[e]);return t.jsxs(C,{title:"Feedback",seoDescription:"Share your feedback, suggestions or concerns about the Institute of Company Secretaries of India (ICSI) website.",lastUpdated:"14 July 2026",cmsSlug:"feedback",children:[t.jsx("p",{children:"We value your feedback. Please use the form below to share your suggestions, report an issue, or tell us about your experience with this website. Submitting the form will open your email client with a pre-filled message addressed to our feedback team."}),t.jsxs("form",{onSubmit:E,className:"mt-4 space-y-4",noValidate:!0,children:[n.length>0&&t.jsxs("div",{ref:g,role:"alert",tabIndex:-1,className:"rounded border border-[#b00020] bg-[#fdf2f4] px-4 py-3",children:[t.jsxs("h2",{className:"font-semibold text-[#b00020]",children:["There ",n.length===1?"is":"are"," ",n.length," ",n.length===1?"problem":"problems"," with this form"]}),t.jsx("ul",{className:"mt-2 list-disc pl-5 text-sm text-[#b00020]",children:n.map(e=>t.jsx("li",{children:t.jsxs("a",{href:`#feedback-${e}`,className:"font-medium underline",children:[x[e],": ",s[e]]})},e))})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:"feedback-name",className:"block font-medium mb-1",children:"Name"}),t.jsx("input",{id:"feedback-name",name:"name",type:"text",autoComplete:"name",value:o,onChange:e=>{y(e.target.value),c("name")},required:!0,...u("name"),className:"w-full rounded border border-gray-300 px-3 py-2"}),b("name")]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:"feedback-email",className:"block font-medium mb-1",children:"Email"}),t.jsx("input",{id:"feedback-email",name:"email",type:"email",autoComplete:"email",value:l,onChange:e=>{k(e.target.value),c("email")},required:!0,...u("email"),className:"w-full rounded border border-gray-300 px-3 py-2"}),b("email")]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:"feedback-category",className:"block font-medium mb-1",children:"Category"}),t.jsx("select",{id:"feedback-category",name:"category",value:m,onChange:e=>j(e.target.value),className:"w-full rounded border border-gray-300 px-3 py-2 bg-white",children:p.map(e=>t.jsx("option",{value:e,children:e},e))})]}),t.jsxs("div",{children:[t.jsx("label",{htmlFor:"feedback-message",className:"block font-medium mb-1",children:"Message"}),t.jsx("textarea",{id:"feedback-message",name:"message",value:d,onChange:e=>{w(e.target.value),c("message")},required:!0,rows:6,...u("message"),className:"w-full rounded border border-gray-300 px-3 py-2"}),b("message")]}),t.jsx("button",{type:"submit",className:"rounded bg-[#0F3479] text-white px-5 py-2 font-medium",children:"Submit Feedback"})]}),N&&t.jsx("p",{role:"status",className:"mt-4 rounded border border-green-300 bg-green-50 px-4 py-3 text-green-800",children:"Thank y
7ou. Your email client has been opened with your feedback pre-filled â please review and send the message to complete your submission."})]})};export{A 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.