module.exports=[16356,a=>{"use strict";var b=a.i(87924),c=a.i(72131);a.s(["ApplicationForm",0,function({jobId:a,jobTitle:d}){let e=(0,c.useRef)(null),[f,g]=(0,c.useState)("idle");async function h(b){b.preventDefault(),g("loading");let c=new FormData(b.currentTarget);c.set("jobPostingId",a);try{(await fetch("/api/apply",{method:"POST",body:c})).ok?(g("success"),e.current?.reset()):g("error")}catch{g("error")}}return"success"===f?(0,b.jsxs)("div",{className:"rounded-2xl bg-green-500/10 border border-green-500/20 p-8 text-center",children:[(0,b.jsx)("p",{className:"text-lg font-semibold text-green-600",children:"Application Submitted!"}),(0,b.jsxs)("p",{className:"mt-2 text-sm text-foreground/60",children:["Thank you for your interest in the ",(0,b.jsx)("strong",{children:d})," position. We will review your application and get back to you."]})]}):(0,b.jsxs)("form",{ref:e,onSubmit:h,className:"space-y-6",children:[(0,b.jsx)("h3",{className:"text-2xl font-heading font-bold text-foreground",children:"Apply for this Position"}),(0,b.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{htmlFor:"apply-name",className:"block text-sm font-semibold text-foreground mb-2",children:"Full Name *"}),(0,b.jsx)("input",{id:"apply-name",name:"name",type:"text",required:!0,className:"w-full rounded-xl border border-border bg-background px-4 py-3 text-foreground placeholder:text-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"Your full name"})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{htmlFor:"apply-email",className:"block text-sm font-semibold text-foreground mb-2",children:"Email *"}),(0,b.jsx)("input",{id:"apply-email",name:"email",type:"email",required:!0,className:"w-full rounded-xl border border-border bg-background px-4 py-3 text-foreground placeholder:text-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"your@email.com"})]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{htmlFor:"apply-phone",className:"block text-sm font-semibold text-foreground mb-2",children:"Phone"}),(0,b.jsx)("input",{id:"apply-phone",name:"phone",type:"tel",className:"w-full rounded-xl border border-border bg-background px-4 py-3 text-foreground placeholder:text-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"+45 ..."})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{htmlFor:"apply-resume",className:"block text-sm font-semibold text-foreground mb-2",children:"Resume / LinkedIn URL"}),(0,b.jsx)("input",{id:"apply-resume",name:"resumeUrl",type:"url",className:"w-full rounded-xl border border-border bg-background px-4 py-3 text-foreground placeholder:text-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/50",placeholder:"https://linkedin.com/in/..."})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("label",{htmlFor:"apply-cover",className:"block text-sm font-semibold text-foreground mb-2",children:"Cover Letter"}),(0,b.jsx)("textarea",{id:"apply-cover",name:"coverLetter",rows:5,className:"w-full rounded-xl border border-border bg-background px-4 py-3 text-foreground placeholder:text-foreground/40 focus:outline-none focus:ring-2 focus:ring-primary/50 resize-none",placeholder:"Tell us why you'd be a great fit..."})]}),"error"===f&&(0,b.jsx)("p",{className:"text-sm text-red-500",children:"Something went wrong. Please try again."}),(0,b.jsx)("button",{type:"submit",disabled:"loading"===f,className:"w-full rounded-xl bg-primary px-6 py-3.5 text-sm font-semibold text-white shadow-lg transition-all hover:bg-primary/90 hover:shadow-xl disabled:opacity-50",children:"loading"===f?"Submitting...":"Submit Application"})]})}])}];

//# sourceMappingURL=components_ui_ApplicationForm_tsx_0q1cvy.._.js.map