(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[920],{5321:(e,s,t)=>{Promise.resolve().then(t.bind(t,9943))},9943:(e,s,t)=>{"use strict";t.d(s,{default:()=>c});var a=t(5155),n=t(2115),l=t(3464);let o="https://www.samimramizfellowship.org/api";if(!o)throw Error("API URL is not defined in environment variables.");let i=()=>{let e=document.cookie.match(RegExp("(^| )XSRF-TOKEN=([^;]+)"));return e?e[2]:null},r=async e=>{try{let s=i();if(!s)throw Error("CSRF token is missing.");return(await l.A.post("".concat(o,"/contacts"),e,{withCredentials:!0,headers:{"Content-Type":"multipart/form-data",Accept:"application/json","X-XSRF-TOKEN":s}})).data}catch(e){throw console.error("Error applying for post:",e.message),e}},c=()=>{let[e,s]=(0,n.useState)(null),[t,l]=(0,n.useState)({full_name:"",email:"",subject:"",message:""}),[o,i]=(0,n.useState)(!1),[c,m]=(0,n.useState)(null),d=t=>{s(e===t?null:t)},u=e=>{let{name:s,value:t}=e.target;l(e=>({...e,[s]:t}))},h=async e=>{if(e.preventDefault(),m(null),!t.full_name||!t.email||!t.subject||!t.message)return void m("Please fill out all required fields.");i(!0);try{let e=await r(t);m("Thank you for your message. We will get back to you soon!"),l({full_name:"",email:"",subject:"",message:""}),console.log(e)}catch(e){console.error("Error submitting the form:",e),m("Something went wrong. Please try again later.")}finally{i(!1)}};return(0,a.jsx)("div",{className:"min-h-screen py-10 px-6 max-w-6xl mx-auto",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-10",children:[(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:"text-3xl font-bold text-gray-800 mb-4",children:"Frequently Asked Questions"}),(0,a.jsx)("p",{className:"text-gray-600 mb-8",children:"Answers to common questions about the fellowship program and application process."}),(0,a.jsx)("div",{className:"space-y-4 text-base",children:[{question:"Who is eligible to apply for the Samim & Ramiz Fellowship?",answer:"The fellowship is open to young Afghan journalists who demonstrate a strong commitment to ethical journalism and a desire to contribute to local media. Applicants must be Afghan nationals and have some experience in journalism."},{question:"What support do fellows receive during the program?",answer:"Fellows receive mentorship from experienced journalists, a monthly stipend to cover living expenses, and placement at a host media outlet in one of Afghanistan’s provinces."},{question:"How are fellows selected for the program?",answer:"Fellows are selected through a competitive process managed by a panel of expert Afghan journalists. The selection is based on the applicant’s experience, commitment to journalism, and potential to contribute to local media."}].map((s,t)=>(0,a.jsxs)("div",{className:"bg-white shadow rounded-md p-4 cursor-pointer",children:[(0,a.jsxs)("div",{onClick:()=>d(t),className:"flex justify-between items-center",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-gray-800",children:s.question}),(0,a.jsx)("span",{className:"text-[#BE4C19] font-bold",children:e===t?"−":"+"})]}),(0,a.jsx)("div",{className:"mt-2 overflow-hidden transition-all duration-500 ease-in-out ".concat(e===t?"max-h-[200px] opacity-100":"max-h-0 opacity-0"),children:(0,a.jsx)("p",{className:"text-gray-600",children:s.answer})})]},t))})]}),(0,a.jsxs)("section",{children:[(0,a.jsx)("h2",{className:"text-3xl font-bold text-gray-800 mb-4",children:"Contact Us"}),(0,a.jsxs)("p",{className:"text-gray-600 mb-6",children:["Reach out to us with any questions or inquiries. You can fill out the form below or email us directly at:"," ",(0,a.jsx)("a",{href:"mailto:info@samimramizfellowship.org",className:"text-[#BE4C19] font-semibold hover:underline",children:"info@samimramizfellowship.org"})]}),(0,a.jsxs)("form",{onSubmit:h,className:"space-y-4 bg-white shadow rounded-md p-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-gray-700 font-medium",children:["Full Name ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"text",name:"full_name",value:t.full_name,onChange:u,className:"w-full mt-1 p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-gray-700 font-medium",children:["Email Address ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"email",name:"email",value:t.email,onChange:u,className:"w-full mt-1 p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-gray-700 font-medium",children:["Subject ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"text",name:"subject",value:t.subject,onChange:u,className:"w-full mt-1 p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-gray-700 font-medium",children:["Your Message ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("textarea",{name:"message",rows:4,value:t.message,onChange:u,className:"w-full mt-1 p-2 border rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500"})]}),(0,a.jsx)("button",{type:"submit",disabled:o,className:"w-full bg-[#BE4C19] text-white font-medium py-2 rounded-md hover:bg-orange-600",children:o?"Submitting...":"Submit"})]}),c&&(0,a.jsx)("p",{className:"mt-4 text-center text-sm text-gray-700",children:c})]})]})})}}},e=>{var s=s=>e(e.s=s);e.O(0,[464,441,684,358],()=>s(5321)),_N_E=e.O()}]);