1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5833],{35833:function(e,s,a){"use strict";a.r(s),a.d(s,{__N_SSP:function(){return r},default:function(){return l}});var i=a(85893),n=a(67294),t=a(9008),o=a.n(t),r=!0;function l(){let[e,s]=(0,n.useState)("[email protected]"),[a,t]=(0,n.useState)("shop"),[r,l]=(0,n.useState)("pl"),[d,p]=(0,n.useState)(!1),[c,u]=(0,n.useState)(null),[m,x]=(0,n.useState)("simple"),y={simple:{orderNumber:"PC-2024-001",firstName:"Jan",lastName:"Kowalski",email:e,phone:"+48 123 456 789",currency:"PLN",items:[{name:"Koszulka Power Canvas",quantity:2,price:89.99,personalization:{size:"L",name:"KOWALSKI",number:"10"}}],delivery:{methodName:"Kurier DPD",cost:"15.99",estimatedDays:"2-3 dni robocze",address:{street:"ul. Testowa 123/45",postalCode:"00-001",city:"Warszawa",country:"Polska"}},payment:{methodName:"Przelew bankowy",processingFee:0,instructions:"Prosimy o dokonanie przelewu w ciÄ
gu 7 dni."}},complex:{orderNumber:"PC-2024-002",firstName:"Anna",lastName:"Nowak",email:e,phone:"+48 987 654 321",currency:"PLN",items:[{name:"Koszulka Power Canvas",quantity:1,price:89.99,personalization:{size:"M",name:"NOWAK",number:"7"}},{name:"Spodenki Power Canvas",quantity:2,price:59.99,personalization:{size:"L",name:"NOWAK",number:"7"}},{name:"Getry Power Canvas",quantity:1,price:39.99,personalization:{size:"L"}}],delivery:{methodName:"Kurier UPS",cost:"19.99",estimatedDays:"1-2 dni robocze",address:{street:"ul. PrzykÅadowa 456",postalCode:"50-001",city:"WrocÅaw",country:"Polska"}},payment:{methodName:"Karta pÅatnicza",processingFee:2.5,instructions:"PÅatnoÅÄ zostaÅa przetworzona automatycznie."}},inpost:{orderNumber:"PC-2024-003",firstName:"Piotr",lastName:"WiÅniewski",email:e,phone:"+48 555 666 777",currency:"PLN",items:[{name:"Bluza Power Canvas",quantity:1,price:129.99,personalization:{size:"XL",name:"WIÅNIEWSKI",number:"22",notes:"Dodatkowe wzmocnienie na Åokciach"}}],delivery:{type:"inpost",methodId:"inpost",methodName:"Paczkomat InPost",cost:"8.99",estimatedDays:"1-2 dni robocze",paczkomatId:"WAW12345M"},payment:{methodName:"PÅatnoÅÄ online",processingFee:0,instructions:"PÅatnoÅÄ zostaÅa zrealizowana pomyÅlnie."}}},h=async()=>{p(!0),u(null);try{let s={...y[m],email:e};console.log("\uD83D\uDCE7 Sending test email:",{orderData:s,mode:a,locale:r});let i=await fetch("/api/orders/send-confirmation-email",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({orderData:s,mode:a,locale:r})}),n=await i.json();n.success?u({success:!0,message:"Email wysÅany pomyÅlnie!"}):u({success:!1,message:n.message||"BÅÄ
d wysyÅania"})}catch(e){console.error("â Error:",e),u({success:!1,message:e.message})}finally{p(!1)}};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(o(),{children:(0,i.jsx)("title",{children:"Test Email - Power Canvas"})}),(0,i.jsx)("div",{style:{padding:"40px 20px",maxWidth:"800px",margin:"0 auto",fontFamily:"system-ui, -apple-system, sans-serif",background:"#f5f5f5",minHeight:"100vh"},children:(0,i.jsxs)("div",{style:{background:"white",padding:"40px",borderRadius:"12px",boxShadow:"0 4px 12px rgba(0,0,0,0.1)"},children:[(0,i.jsx)("h1",{style:{color:"#007cba",marginBottom:"30px"},children:"\uD83D\uDCE7 Test Email Confirmation"}),(0,i.jsxs)("div",{style:{marginBottom:"25px"},children:[(0,i.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"600",color:"#374151"},children:"\uD83D\uDCE7 Email docelowy:"}),(0,i.jsx)("input",{type:"email",value:e,onChange:e=>s(e.target.value),style:{width:"100%",padding:"12px",border:"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px"},placeholder:"Wpisz email testowy"})]}),(0,i.jsxs)("div",{style:{marginBottom:"25px"},children:[(0,i.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"600",color:"#374151"},children:"\uD83C\uDFAF Tryb zam\xf3wienia:"}),(0,i.jsxs)("div",{style:{display:"flex",gap:"15px"},children:[(0,i.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,i.jsx)("input",{type:"radio",value:"shop",checked:"shop"===a,onChange:e=>t(e.target.value)}),(0,i.jsx)("span",{children:"\uD83D\uDED2 Shop (Zam\xf3wienie)"})]}),(0,i.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,i.jsx)("input",{type:"radio",value:"reorder",checked:"reorder"===a,onChange:e=>t(e.target.value)}),(0,i.jsx)("span",{children:"\uD83D\uDD04 Reorder (Dom\xf3wienie)"})]})]})]}),(0,i.jsxs)("div",{style:{marginBottom:"25px"},children:[(0,i.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"600",color:"#374151"},children:"\uD83C\uDF0D JÄzyk:"}
1),(0,i.jsxs)("div",{style:{display:"flex",gap:"15px"},children:[(0,i.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,i.jsx)("input",{type:"radio",value:"pl",checked:"pl"===r,onChange:e=>l(e.target.value)}),(0,i.jsx)("span",{children:"\uD83C\uDDF5\uD83C\uDDF1 Polski"})]}),(0,i.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,i.jsx)("input",{type:"radio",value:"en",checked:"en"===r,onChange:e=>l(e.target.value)}),(0,i.jsx)("span",{children:"\uD83C\uDDEC\uD83C\uDDE7 English"})]})]})]}),(0,i.jsxs)("div",{style:{marginBottom:"30px"},children:[(0,i.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"600",color:"#374151"},children:"\uD83D\uDCE6 Typ zam\xf3wienia:"}),(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[(0,i.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,i.jsx)("input",{type:"radio",value:"simple",checked:"simple"===m,onChange:e=>x(e.target.value)}),(0,i.jsx)("span",{children:"\uD83D\uDCC4 Proste (1 produkt + kurier)"})]}),(0,i.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,i.jsx)("input",{type:"radio",value:"complex",checked:"complex"===m,onChange:e=>x(e.target.value)}),(0,i.jsx)("span",{children:"\uD83D\uDCCB ZÅożone (3 produkty + kurier)"})]}),(0,i.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,i.jsx)("input",{type:"radio",value:"inpost",checked:"inpost"===m,onChange:e=>x(e.target.value)}),(0,i.jsx)("span",{children:"\uD83D\uDCE6 InPost (1 produkt + paczkomat)"})]})]})]}),(0,i.jsx)("button",{onClick:h,disabled:d||!e,style:{width:"100%",padding:"15px",background:d?"#6b7280":"#007cba",color:"white",border:"none",borderRadius:"8px",fontSize:"18px",fontWeight:"600",cursor:d?"not-allowed":"pointer",marginBottom:"20px"},children:d?"\uD83D\uDCE4 WysyÅanie...":"\uD83D\uDCE7 WyÅlij Test Email"}),c&&(0,i.jsxs)("div",{style:{padding:"15px",borderRadius:"8px",background:c.success?"#d1fae5":"#fee2e2",border:"1px solid ".concat(c.success?"#10b981":"#ef4444"),color:c.success?"#065f46":"#991b1b"},children:[(0,i.jsx)("strong",{children:c.success?"â
Sukces!":"â BÅÄ
d!"}),(0,i.jsx)("p",{style:{margin:"5px 0 0 0"},children:c.message})]}),(0,i.jsxs)("details",{style:{marginTop:"30px"},children:[(0,i.jsx)("summary",{style:{cursor:"pointer",padding:"10px",background:"#f3f4f6",borderRadius:"6px",fontWeight:"600"},children:"\uD83D\uDD0D PodglÄ
d danych zam\xf3wienia"}),(0,i.jsx)("pre",{style:{marginTop:"15px",padding:"20px",background:"#f8f9fa",borderRadius:"6px",fontSize:"12px",overflow:"auto",border:"1px solid #e5e7eb"},children:JSON.stringify({...y[m],email:e},null,2)})]}),(0,i.jsxs)("div",{style:{marginTop:"30px",padding:"20px",background:"#fffbeb",border:"1px solid #f59e0b",borderRadius:"8px",fontSize:"14px"},children:[(0,i.jsx)("h3",{style:{margin:"0 0 10px 0",color:"#92400e"},children:"\uD83D\uDCA1 Instrukcja testowania:"}),(0,i.jsxs)("ul",{style:{margin:0,paddingLeft:"20px",color:"#92400e"},children:[(0,i.jsxs)("li",{children:[(0,i.jsx)("strong",{children:"Proste:"})," 1 produkt, dostawa kurierem"]}),(0,i.jsxs)("li",{children:[(0,i.jsx)("strong",{children:"ZÅożone:"})," 3 produkty, dostawa kurierem"]}),(0,i.jsxs)("li",{children:[(0,i.jsx)("strong",{children:"InPost:"})," 1 produkt, dostawa do paczkomatu"]}),(0,i.jsxs)("li",{children:[(0,i.jsx)("strong",{children:"Mobile:"})," Otw\xf3rz email na telefonie i sprawdź layout"]}),(0,i.jsxs)("li",{children:[(0,i.jsx)("strong",{children:"Desktop:"})," Sprawdź czy tabela wyglÄ
da poprawnie"]})]})]})]})})]})}l.getLayout=function(e){return e}},9008:function(e,s,a){e.exports=a(23867)}}]);
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.