1import{u as L,b as R,k as q,r as n,j as e,d as x,m as o,A as z,X as B,L as O,s as w,e as u}from"./index-CR8jIHGL.js";import{S as J}from"./Seo-Bvm9iGRd.js";import{I as h}from"./input-CBgH9T9i.js";import{T}from"./textarea-zwKlMF9-.js";import{B as l}from"./badge-DXOCijAB.js";import{A as F}from"./arrow-left-C6UQi8Yb.js";import{B as I}from"./briefcase-pyW5EU0m.js";import{M as k}from"./map-pin-BnxY2z23.js";import{C as D}from"./clock-BRuMITIk.js";import{S as C}from"./send-D1X2wYJv.js";import{C as H}from"./circle-check-FO8rVln-.js";function ee(){const{t}=L(),S=R(),{user:g}=q(),[f,_]=n.useState([]),[A,P]=n.useState(!0),[r,c]=n.useState(null),[j,b]=n.useState(!1),[y,d]=n.useState(!1),[m,N]=n.useState(!1),[s,i]=n.useState({name:"",phone:"",email:"",cover_note:""});n.useEffect(()=>{(async()=>{const{data:p}=await w.from("job_listings").select("*").eq("is_active",!0).order("created_at",{ascending:!1});_(p??[]),P(!1)})()},[]);const E=async()=>{if(!s.name.trim()||!s.phone.trim()){u.error(t("crNamePhoneRequired"));return}if(!g){u.error(t("crSignInToApply"));return}d(!0);const{error:a}=await w.from("job_applications").insert({job_id:r.id,user_id:g.id,applicant_name:s.name.trim(),applicant_phone:s.phone.trim(),applicant_email:s.email.trim()||null,cover_note:s.cover_note.trim()||null});if(a){u.error(a.message),d(!1);return}N(!0),d(!1)},v={"full-time":"bg-primary/10 text-primary","part-time":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",contract:"bg-cyan-100 text-cyan-700 dark:bg-cyan-900/30 dark:text-cyan-300"};return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(J,{title:"Careers at EasyPay â Join the Fintech Revolution",description:"Open roles at EasyPay. Help build Bangladesh's leading digital wallet across engineering, product, design, operations and support.",path:"/careers",jsonLd:{"@context":"https://schema.org","@type":"CollectionPage",name:"EasyPay Careers",url:"https://pay-palooza-go.lovable.app/careers"}}),e.jsxs("div",{className:"sticky top-0 z-40 gradient-hero text-primary-foreground border-b border-primary/30 shadow-glow px-4 py-3 flex items-center gap-3",children:[e.jsx(x,{variant:"ghost",size:"icon",onClick:()=>S(-1),children:e.jsx(F,{className:"w-5 h-5"})}),e.jsx("h1",{className:"text-base font-bold text-foreground",children:t("crHeader")})]}),e.jsxs("div",{className:"px-4 pt-4 pb-20 space-y-4",children:[e.jsxs("div",{className:"text-center py-4",children:[e.jsx("h2",{className:"text-xl font-extrabold text-foreground",children:t("crJoinTeam")}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t("crJoinSub")})]}),A?e.jsx("div",{className:"text-center py-12 text-muted-foreground",children:t("crLoadingOpenings")}):f.length===0?e.jsxs("div",{className:"text-center py-12",children:[e.jsx(I,{className:"w-12 h-12 text-muted-foreground/30 mx-auto mb-3"}),e.jsx("p",{className:"text-muted-foreground",children:t("crNoOpenings")}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:t("crCheckBack")})]}):e.jsx("div",{className:"space-y-3",children:f.map((a,p)=>e.jsxs(o.button,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{delay:p*.05},onClick:()=>{c(a),b(!1),N(!1),i({name:"",phone:"",email:"",cover_note:""})},className:"w-full text-left bg-card rounded-2xl border border-border p-4 space-y-2 hover:shadow-md transition-shadow",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-bold text-foreground",children:a.title}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a.department||t("crGeneral")})]}),e.jsx(l,{className:`text-[10px] shrink-0 ${v[a.type]||""}`,children:a.type})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(k,{className:"w-3 h-3"}),a.location]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(D,{className:"w-3 h-3"}),new Date(a.created_at).toLocaleDateString()]})]})]},a.id))})]}),e.jsx(z,{children:r&&e.jsxs(e.Fragment,{children:[e.jsx(o.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/40 backdrop-blur-sm",onClick:()=>c(null)}),e.jsxs(o.div,{initial:{y:"100%"},animate:{y:0},exit:{y:"100%"},transition:{type:"spring",stiffness:340,damping:34},className:"fixed inset-x-0 bottom-0 z-50 max-w-md mx-auto bg-background rounded-t-3xl border-t border-border shadow-lg max-h-[85vh] overflow-y-auto",children:[e.jsxs("div",{className:"px-5 pt-4 pb-2 flex items-center justify-between sticky top-0 bg-background z-10",children:[e.jsx("h2",{className:"text-lg font-extrabold text-foreground",children:r.title}),e.jsx("button",{onClick:()=>c(null),className:"w-9 h-9 rounded-full bg-muted flex items-center justify-center",children:e.jsx(B,{size:18,className:"text-muted-foreground"})})]}),e.jsxs("div",{className:"px-5 pb-8 space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(l,{className:v[r.type]||"",children:r.type}),e.jsxs(l,{variant:"outline",children:[e.jsx(k,{className:"w-3 h-3 mr-1"}),r.location]}),r.department&&e.jsx(l,{variant:"outline",children:r.department})]}),r.description&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-muted-foreground mb-1",children:t("crDescription")}),e.jsx("p",{className:"text-sm text-foreground whitespace-pre-line",children:r.description})]}),r.requirements&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-muted-foreground mb-1",children:t("crRequirements")}),e.jsx("p",{className:"text-sm text-foreground whitespace-pre-line",children:r.requirements})]}),!j&&!m&&e.jsxs(x,{className:"w-full h-12",onClick:()=>b(!0),children:[e.jsx(C,{className:"w-4 h-4 mr-2"})," ",t("crApplyNow")]}),m&&e.jsxs("div",{className:"text-center py-4 space-y-2",children:[e.jsx(H,{className:"w-10 h-10 text-primary mx-auto"}),e.jsx("p",{className:"font-bold text-foreground",children:t("crApplicationSubmitted")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("crApplicationReview")})]}),j&&!m&&e.jsxs(o.div,{initial:{opacity:0}
1,animate:{opacity:1},className:"space-y-3 border-t border-border pt-4",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide text-muted-foreground",children:t("crYourApplication")}),e.jsx(h,{placeholder:t("crFullNameReq"),value:s.name,onChange:a=>i({...s,name:a.target.value})}),e.jsx(h,{placeholder:t("crPhoneReq"),value:s.phone,onChange:a=>i({...s,phone:a.target.value})}),e.jsx(h,{placeholder:t("crEmailOpt"),value:s.email,onChange:a=>i({...s,email:a.target.value})}),e.jsx(T,{placeholder:t("crCoverNoteOpt"),value:s.cover_note,onChange:a=>i({...s,cover_note:a.target.value}),rows:3}),e.jsxs(x,{className:"w-full h-12",onClick:E,disabled:y,children:[y?e.jsx(O,{className:"w-4 h-4 animate-spin mr-2"}):e.jsx(C,{className:"w-4 h-4 mr-2"}),t("crSubmitApp")]})]})]})]})]})})]})}export{ee 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.