1import{a6 as g,Y as N,r as v,j as e,m as y,C as m,I as x,B as c,a0 as u,L as w,aJ as k,av as C,aw as X,f as D,g as h}from"./index-DMpD5zQ4.js";import{e as I}from"./useCertificates-B9qqdPf_.js";import{B as S}from"./badge-bMO3_tW7.js";import{C as V}from"./circle-x-DAvI2nFZ.js";function F(){var n,o,d;const{certificateNumber:i}=g(),f=N(),[r,l]=v.useState(""),{data:t,isLoading:p,error:b}=I(i||""),a=()=>{r.trim()&&f(`/certificate/${r.trim()}`)};if(!i)return e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/30 pt-20 pb-16 md:pt-24",children:e.jsxs("div",{className:"container mx-auto px-4 max-w-2xl",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"w-20 h-20 mx-auto rounded-full bg-gradient-to-br from-primary to-primary/60 flex items-center justify-center mb-4",children:e.jsx(y,{className:"w-10 h-10 text-primary-foreground"})}),e.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Certificate Verification"}),e.jsx("p",{className:"text-muted-foreground",children:"Verify the authenticity of a course completion certificate"})]}),e.jsx(m,{className:"p-6",children:e.jsxs("div",{className:"flex gap-3",children:[e.jsx(x,{placeholder:"Enter certificate ID (e.g., CERT-XXXX-XXXX)",value:r,onChange:s=>l(s.target.value),onKeyDown:s=>s.key==="Enter"&&a(),className:"text-lg h-12"}),e.jsxs(c,{onClick:a,size:"lg",children:[e.jsx(u,{className:"h-5 w-5 mr-2"}),"Verify"]})]})})]})});if(p)return e.jsx("div",{className:"min-h-screen flex items-center justify-center",children:e.jsx(w,{className:"w-8 h-8 animate-spin"})});const j=!b&&t;return e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-background to-muted/30 pt-20 pb-16 md:pt-24",children:e.jsxs("div",{className:"container mx-auto px-4 max-w-3xl",children:[e.jsx("div",{className:"mb-8",children:e.jsxs("div",{className:"flex gap-3 max-w-md mx-auto",children:[e.jsx(x,{placeholder:"Enter certificate ID",value:r,onChange:s=>l(s.target.value),onKeyDown:s=>s.key==="Enter"&&a()}),e.jsx(c,{onClick:a,variant:"outline",children:e.jsx(u,{className:"h-4 w-4"})})]})}),j?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"relative p-3 bg-gradient-to-br from-[hsl(var(--primary))] via-[hsl(var(--primary)/0.8)] to-[hsl(var(--primary)/0.6)] rounded-xl shadow-2xl",children:e.jsxs("div",{className:"bg-[#fffdf7] dark:bg-card rounded-lg p-8 md:p-12 relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-4 left-4 w-16 h-16 border-t-2 border-l-2 border-amber-500/60"}),e.jsx("div",{className:"absolute top-4 right-4 w-16 h-16 border-t-2 border-r-2 border-amber-500/60"}),e.jsx("div",{className:"absolute bottom-4 left-4 w-16 h-16 border-b-2 border-l-2 border-amber-500/60"}),e.jsx("div",{className:"absolute bottom-4 right-4 w-16 h-16 border-b-2 border-r-2 border-amber-500/60"}),e.jsx("div",{className:"absolute top-6 right-6",children:e.jsxs(S,{className:"bg-green-600 text-white gap-1 text-sm px-3 py-1",children:[e.jsx(k,{className:"h-4 w-4"}),"Verified"]})}),e.jsxs("div",{className:"text-center",children:[e.jsx("img",{src:C,alt:"SkilliHire Logo",className:"w-auto h-12 mx-auto mb-3 object-contain"}),e.jsx("p",{className:"text-xs tracking-[6px] text-amber-600 uppercase font-medium",children:"SkilliHire"}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold tracking-[6px] uppercase mt-3 mb-1",style:{fontFamily:"'Georgia', serif"},children:"Certificate"}),e.jsx("p",{className:"text-sm tracking-[8px] text-muted-foreground uppercase mb-8",children:"of Completion"}),e.jsx("p",{className:"text-xs tracking-[3px] text-muted-foreground uppercase mb-4",children:"This is to certify that"}),e.jsx("p",{className:"text-3xl md:text-4xl font-semibold border-b-2 border-amber-500 inline-block pb-2 mb-6",style:{fontFamily:"'Georgia', serif"},children:t.certificate_name||((n=t.profile)==null?void 0:n.full_name)||"Student"}),e.jsx("p",{className:"text-xs tracking-[3px] text-muted-foreground uppercase mb-3",children:"has successfully completed the course"}),e.jsx("p",{className:"text-xl md:text-2xl font-bold text-primary mb-8",style:{fontFamily:"'Georgia', serif"},children:(o=t.course)==null?void 0:o.title}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-8 md:gap-16 pt-6 border-t border-amber-200/50",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-[10px] tracking-[3px] text-muted-foreground uppercase",children:"Date Issued"}),e.jsx("p",{className:"font-medium text-sm mt-1",children:X(new Date(t.issued_at),"MMMM d, yyyy")})]}),((d=t.course)==null?void 0:d.duration_hours)&&e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-[10px] tracking-[3px] text-muted-foreground uppercase",children:"Duration"}),e.jsxs("p",{className:"font-medium text-sm mt-1",children:[t.course.duration_hours," Hours"]})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-[10px] tracking-[3px] text-muted-foreground uppercase",children:"Certificate ID"}
1),e.jsx("p",{className:"font-mono text-xs font-medium mt-1",children:t.certificate_number})]})]}),e.jsx("div",{className:"absolute bottom-8 left-8 w-16 h-16 border-2 border-amber-500/40 rounded-full flex items-center justify-center",children:e.jsx("div",{className:"w-12 h-12 border border-amber-500/40 rounded-full flex items-center justify-center",children:e.jsxs("span",{className:"text-[8px] text-amber-600 text-center leading-tight tracking-wider uppercase font-medium",children:["Verified",e.jsx("br",{}),"Authentic"]})})})]})]})}),e.jsx("div",{className:"mt-6 text-center",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:"This certificate confirms that the above individual has successfully completed the specified course on our platform."})})]}):e.jsxs(m,{className:"overflow-hidden",children:[e.jsx("div",{className:"p-6 text-center bg-destructive/10",children:e.jsxs("div",{className:"flex items-center justify-center gap-3 mb-2",children:[e.jsx(V,{className:"w-8 h-8 text-destructive"}),e.jsx("span",{className:"text-xl font-semibold",children:"Certificate Not Found"})]})}),e.jsxs(D,{className:"p-6 text-center",children:[e.jsxs("p",{className:"text-muted-foreground mb-6",children:["The certificate number ",e.jsx("strong",{className:"font-mono",children:i})," was not found in our records. Please check the certificate number and try again."]}),e.jsx(h,{to:"/",children:e.jsx(c,{children:"Return Home"})})]})]}),e.jsx("div",{className:"text-center mt-8",children:e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Questions about certificate verification?"," ",e.jsx(h,{to:"/contact",className:"text-primary hover:underline",children:"Contact us"})]})})]})})}export{F 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.