PageSourceSearch

https://nontechaiadvisory.com/assets/Cart-Cs_A20Pm.js

js nontechaiadvisory.com collected 2026-10-10 00:09:10 UTC 5,254 bytes, 1 lines download raw bytes

1import{ao as p,u as j,j as s,b as x,P as m,B as r,L as l,S as N,ap as g,ar as b}from"./index-CrezPnxx.js";import{v as y,g as v}from"./vat-DhIO-zvV.js";import{S as F}from"./shopping-bag-BHmWysaZ.js";import{M as f}from"./minus-CMqN4Waa.js";import{P as E}from"./plus-D7fXq0gA.js";import{T as w}from"./trash-2-DbXTkFe4.js";const P=()=>{var o;const{items:c,removeItem:h,updateQty:i,getTotal:n}=p(),{t}=j(),a=(e,u="EUR")=>new Intl.NumberFormat("et-EE",{style:"currency",currency:u}).format(e/100);if(c.length===0)return s.jsx(x,{children:s.jsx(m,{children:s.jsx("div",{className:"min-h-screen bg-[#F8F5EF]",children:s.jsx("div",{className:"mx-auto w-[min(760px,calc(100%-24px))] py-20 text-center",children:s.jsxs("div",{className:"rounded-lg border border-[#DFE2EA] bg-white p-8 shadow-sm",children:[s.jsx("div",{className:"mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-lg bg-[#273A63] text-[#D8B45A]",children:s.jsx(F,{className:"h-8 w-8"})}),s.jsx("h1",{className:"font-display mb-4 text-2xl font-bold tracking-tight text-[#151719]",children:t("cart.empty.title")}),s.jsx("p",{className:"mb-8 text-[#5F6065]",children:t("cart.empty.desc")}),s.jsx(r,{variant:"outline",asChild:!0,className:"rounded-lg border-[#273A63] bg-white text-[#273A63] hover:bg-[#F8F5EF]",children:s.jsx(l,{to:"/pood",children:t("cart.empty.cta")})})]})})})})});const d=((o=c[0])==null?void 0:o.currency)||"EUR";return s.jsx(x,{children:s.jsxs(m,{children:[s.jsx(N,{title:"Ostukorv",noIndex:!0}),s.jsx("div",{className:"min-h-screen bg-[#F8F5EF] text-[#151719]",children:s.jsxs("div",{className:"mx-auto w-[min(1180px,calc(100%-24px))] py-12 md:py-16",children:[s.jsx(r,{variant:"ghost",asChild:!0,className:"mb-8 rounded-lg text-[#273A63] hover:bg-white hover:text-[#273A63]",children:s.jsxs(l,{to:"/pood",children:[s.jsx(g,{className:"mr-2 h-4 w-4"}),t("cart.continueShopping")]})}),s.jsx("h1",{className:"font-display mb-8 text-3xl font-bold tracking-tight text-[#151719]",children:t("cart.title")}),s.jsxs("div",{className:"grid gap-8 lg:grid-cols-3",children:[s.jsx("div",{className:"space-y-4 lg:col-span-2",children:c.map(e=>
1s.jsxs("div",{className:"flex items-center gap-4 rounded-lg border border-[#DFE2EA] bg-white p-4 shadow-sm",children:[s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx(l,{to:`/toode/${e.slug}`,className:"line-clamp-2 font-semibold text-[#151719] transition-colors hover:text-[#3157E8]",children:e.title}),s.jsxs("p",{className:"mt-1 text-sm text-[#5F6065]",children:[a(e.unitPrice,e.currency)," ",t("cart.perUnit")," ",t("cart.summary.vatExcluded")]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(r,{variant:"outline",size:"icon",className:"h-8 w-8 rounded-lg border-[#DFE2EA] text-[#273A63] hover:bg-[#F8F5EF]",onClick:()=>i(e.productId,e.qty-1),disabled:e.qty<=1,children:s.jsx(f,{className:"h-4 w-4"})}),s.jsx("span",{className:"w-8 text-center font-medium text-[#151719]",children:e.qty}),s.jsx(r,{variant:"outline",size:"icon",className:"h-8 w-8 rounded-lg border-[#DFE2EA] text-[#273A63] hover:bg-[#F8F5EF]",onClick:()=>i(e.productId,e.qty+1),disabled:e.qty>=10,children:s.jsx(E,{className:"h-4 w-4"})})]}),s.jsxs("div",{className:"min-w-[100px] text-right",children:[s.jsx("p",{className:"font-semibold text-[#151719]",children:a(e.unitPrice*e.qty,e.currency)}),s.jsx("p",{className:"text-xs text-[#5F6065]",children:t("cart.summary.vatExcluded")})]}),s.jsx(r,{variant:"ghost",size:"icon",className:"rounded-lg text-[#5F6065] hover:bg-[#F8F5EF] hover:text-[#C95662]",onClick:()=>{h(e.productId),b.removed(e.title)},children:s.jsx(w,{className:"h-4 w-4"})})]},e.productId))}),s.jsx("div",{className:"lg:col-span-1",children:s.jsxs("div",{className:"sticky top-24 space-y-4 rounded-lg border border-[#DFE2EA] bg-white p-6 shadow-sm",children:[s.jsx("h2",{className:"font-display text-xl font-semibold text-[#151719]",children:t("cart.summary.title")}),s.jsx("div",{className:"space-y-2 border-b border-[#DFE2EA] pb-4",children:c.map(e=>s.jsxs("div",{className:"flex justify-between text-sm",children:[s.jsxs("span",{className:"max-w-[60%] truncate text-[#5F6065]",children:[e.title," × ",e.qty]}),s.jsxs("span",{className:"text-[#151719]",children:[a(e.unitPrice*e.qty,e.currency)," ",s.jsx("span",{className:"text-xs text-[#5F6065]",children:t("cart.summary.vatExcluded")})]})]},e.productId))}),s.jsxs("div",{className:"space-y-2 text-sm",children:[s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-[#5F6065]",children:t("cart.summary.subtotalNet")}),s.jsx("span",{className:"text-[#151719]",children:a(n(),d)})]}),s.jsxs("div",{className:"flex justify-between",children:[s.jsx("span",{className:"text-[#5F6065]",children:t("cart.summary.vat")}),s.jsx("span",{className:"text-[#151719]",children:a(y(n()),d)})]})]}),s.jsxs("div",{className:"flex justify-between border-t border-[#DFE2EA] pt-3 text-lg font-semibold",children:[s.jsx("span",{children:t("cart.summary.totalGross")}),s.jsx("span",{className:"text-[#273A63]",children:a(v(n()),d)})]}),s.jsx(r,{asChild:!0,size:"lg",className:"w-full rounded-lg bg-[#3157E8] text-white hover:bg-[#294AC7]",children:s.jsx(l,{to:"/checkout",children:t("cart.summary.cta")})})]})})]})]})})]})})};export{P 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.