(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,21944,e=>{"use strict";var r=e.i(43476),o=e.i(71645);e.s(["ApplicationForm",0,function({jobId:e,jobTitle:l}){let t=(0,o.useRef)(null),[n,s]=(0,o.useState)("idle");async function a(r){r.preventDefault(),s("loading");let o=new FormData(r.currentTarget);o.set("jobPostingId",e);try{(await fetch("/api/apply",{method:"POST",body:o})).ok?(s("success"),t.current?.reset()):s("error")}catch{s("error")}}return"success"===n?(0,r.jsxs)("div",{className:"rounded-2xl bg-green-500/10 border border-green-500/20 p-8 text-center",children:[(0,r.jsx)("p",{className:"text-lg font-semibold text-green-600",children:"Application Submitted!"}),(0,r.jsxs)("p",{className:"mt-2 text-sm text-foreground/60",children:["Thank you for your interest in the ",(0,r.jsx)("strong",{children:l})," position. We will review your application and get back to you."]})]}):(0,r.jsxs)("form",{ref:t,onSubmit:a,className:"space-y-6",children:[(0,r.jsx)("h3",{className:"text-2xl font-heading font-bold text-foreground",children:"Apply for this Position"}),(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"apply-name",className:"block text-sm font-semibold text-foreground mb-2",children:"Full Name *"}),(0,r.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,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"apply-email",className:"block text-sm font-semibold text-foreground mb-2",children:"Email *"}),(0,r.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,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"apply-phone",className:"block text-sm font-semibold text-foreground mb-2",children:"Phone"}),(0,r.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,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"apply-resume",className:"block text-sm font-semibold text-foreground mb-2",children:"Resume / LinkedIn URL"}),(0,r.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,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:"apply-cover",className:"block text-sm font-semibold text-foreground mb-2",children:"Cover Letter"}),(0,r.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"===n&&(0,r.jsx)("p",{className:"text-sm text-red-500",children:"Something went wrong. Please try again."}),(0,r.jsx)("button",{type:"submit",disabled:"loading"===n,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"===n?"Submitting...":"Submit Application"})]})}])}]);