import{a as f,j as e,u as g,B as j,P as s,T as n,a2 as r}from"./render-D1ZqzUbP.js";import{W as y}from"./WorkspacePremium-oZlDKw5g.js";import{A as w}from"./Alert-M7jUzTjE.js";import{G as i}from"./Grid-BihMtcd8.js";import"./isMuiElement-BcEQvMml.js";const v=()=>{const{errorMessage:a}=g();return e.jsx(e.Fragment,{children:a?e.jsx(w,{severity:"error",sx:{maxWidth:800,margin:"20px auto"},children:a}):e.jsx($,{})})},$=()=>{const{localeMessages:a,name:l,issueDate:x,certificateNumber:m,qrcodeUrl:h,logoUrl:d}=g();return e.jsx(j,{sx:{p:{xs:1,sm:2,md:4},"@media print":{"@page":{size:"A4 landscape",margin:0},p:0},width:"100%",boxSizing:"border-box",display:"flex",justifyContent:{xs:"flex-start",md:"center"},overflowX:"auto",overflowY:"hidden",WebkitOverflowScrolling:"touch"},children:e.jsx(s,{elevation:2,sx:t=>({flex:"0 0 auto",padding:"10mm",width:"277mm",height:"190mm",borderRadius:3,position:"relative",backgroundImage:(()=>{const o=r(t.palette.primary.main,.22),c=r(t.palette.secondary.main,.35),b=r(t.palette.secondary.main,.88),u=r(t.palette.primary.main,.88),p=r(t.palette.common.white,.05);return[`linear-gradient(15deg, transparent 0 35%, ${o} 35% 41%, transparent 41% 100%)`,`linear-gradient(-28deg, transparent 0 55%, ${o} 55% 61%, transparent 61% 100%)`,`radial-gradient(circle at 10% 10%, ${c} 0%, transparent 55%)`,`radial-gradient(circle at 90% 90%, ${c} 0%, transparent 55%)`,`repeating-linear-gradient(45deg, ${p} 0 1px, transparent 1px 12px)`,`repeating-linear-gradient(-45deg, ${p} 0 1px, transparent 1px 12px)`,`linear-gradient(135deg, ${b} 0%, ${u} 100%)`].join(", ")})(),backgroundColor:r(t.palette.common.white,.3),backgroundBlendMode:"screen, screen, soft-light, soft-light, overlay, overlay, normal",overflow:"hidden",shadowColor:"rgba(0, 0, 0, 0.5)",pageBreakAfter:"always"}),children:e.jsx(s,{elevation:0,sx:{padding:"1mm",borderRadius:2,boxSizing:"border-box",width:"100%",height:"100%"},children:e.jsxs(s,{elevation:0,sx:t=>({width:"100%",height:"100%",display:"flex",borderRadius:2,border:`2px solid ${r(t.palette.secondary.main,.5)}`,position:"relative",backgroundImage:[`repeating-linear-gradient(135deg, ${r(t.palette.secondary.main,.02)} 0 1px, transparent 2px 6px)`].join(", "),backgroundColor:r(t.palette.common.white,.95),boxShadow:`inset 0 0 0 1px ${r(t.palette.common.black,.04)}`,"&::before":{content:'""',position:"absolute",top:16,left:16,right:16,height:6,borderRadius:999,background:`linear-gradient(90deg, ${t.palette.secondary.main} 0%, ${t.palette.primary.main} 100%)`,opacity:.25},flexDirection:"column",alignItems:"center",justifyContent:"center",padding:8,boxSizing:"border-box",color:r(t.palette.common.black,.88),"& .MuiTypography-root":{color:r(t.palette.common.black,.88)}}),children:[e.jsx(y,{sx:t=>({fontSize:86,color:t.palette.primary.main,mb:2})}),e.jsx(n,{variant:"h1",gutterBottom:!0,sx:{letterSpacing:"0.04em",textTransform:"uppercase"},children:a.title}),e.jsx(n,{variant:"h3",align:"center",mt:4,sx:{fontWeight:500,maxWidth:"80%"},dangerouslySetInnerHTML:{__html:a.description.replace(l,"<div style='font-size: 2em; padding: 0.5em; font-weight: 700;'>"+l+"</div>")}}),e.jsxs(i,{container:!0,spacing:2,sx:{pt:2,mt:4,width:"100%",minHeight:"100px"},alignItems:"flex-end",children:[e.jsx(i,{item:!0,size:4,sx:{textAlign:"center"},children:e.jsxs(n,{variant:"body2",children:[d&&e.jsxs(e.Fragment,{children:[e.jsx("img",{src:d,alt:"Organization Logo",style:{width:80,height:80,objectFit:"contain"}}),e.jsx("br",{})]}),e.jsx("b",{children:a.organization_team}),e.jsx("br",{}),a.issue_date,": ",x]})}),e.jsx(i,{item:!0,size:4,sx:{textAlign:"center"}}),e.jsx(i,{item:!0,size:4,sx:{textAlign:"center"},children:e.jsxs(n,{variant:"body2",children:[e.jsx("img",{src:h,alt:"QR Code",style:{width:80,height:80}}),e.jsx("br",{}),a.certificate_number,":",e.jsx("br",{}),m]})})]})]})})})})};f({children:e.jsx(v,{})});
//# sourceMappingURL=certificate-hClzNCkC.js.map
