1import{u as y}from"./Dr0CEnrN.js";import{d as h,P as _,c as a,e as t,t as n,i as o,F as v,r as w,q as k,o as r}from"./Dy9Bafi5.js";const C={class:"min-h-screen bg-[#f5f5f7] font-sans"},j={class:"bg-white border-b border-gray-200"},$={class:"max-w-7xl mx-auto px-4 py-4"},F={class:"text-gray-600 text-sm mt-1"},R={class:"max-w-7xl mx-auto px-4 py-8"},S={key:0,class:"text-center py-16"},q={key:1,class:"grid lg:grid-cols-3 gap-8"},z={class:"lg:col-span-2 space-y-4"},B={class:"flex gap-4"},E={class:"w-24 h-24 rounded-xl overflow-hidden flex-shrink-0 bg-gray-100"},L=["src","alt"],T={key:1,class:"w-full h-full flex items-center justify-center text-3xl"},P={class:"flex-1 min-w-0"},Q={class:"font-semibold text-gray-900 text-sm"},A={class:"text-lg font-bold text-green-700 mt-2"},D={class:"flex flex-col items-end gap-2"},G=["onClick"],I={class:"flex items-center gap-2"},M=["onClick"],N={class:"w-8 text-center font-semibold text-gray-900"},V=["onClick"],H={class:"mt-4 pt-4 border-t border-gray-100 flex justify-between items-center"},J={class:"text-lg font-bold text-gray-900"},K={class:"lg:col-span-1"},O={class:"bg-white rounded-2xl border border-gray-200 shadow-sm p-5 lg:sticky lg:top-4"},U={class:"space-y-3 mb-4"},W={class:"flex justify-between text-sm"},X={class:"font-semibold text-gray-900"},Y={class:"flex justify-between items-center pt-4 border-t border-gray-100 mb-6"},Z={class:"text-3xl font-black text-green-600"},ot=h({__name:"carrinho",setup(tt){const{cart:l,removeFromCart:u,increaseQuantity:b,decreaseQuantity:f,cartTotal:d,cartItemCount:c,clearCart:x}=y();_({title:"Carrinho de Compras | Casa do Software",description:"Finalize sua compra de softwares originais com entrega imediata."});function i(g){return g.toFixed(2).replace(".",",")}function p(){k("/checkout")}return(g,e)=>(r(),a("div",C,[t("div",j,[t("div",$,[e[1]||(e[1]=t("h1",{class:"text-2xl font-bold text-gray-900"},"Carrinho de Compras",-1)),t("p",F,n(o(c))+" "+n(o(c)===1?"item":"itens")+" no carrinho ",1)])]),t("div",R,[o(l).length===0?(r(),a("div",S,[...e[2]||(e[2]=[t("div",{class:"text-6xl mb-4"},"ð",-1),t("h2",{class:"text-2xl font-bold text-gray-900 mb-2"},"Seu carrinho está vazio",-1),t("p",{class:"text-gray-600 mb-6"},"Adicione produtos para continuar sua compra",-1),t("a",{href:"/",class:"inline-block bg-blue-600 hover:bg-blue-700 text-white font-semibold px-6 py-3 rounded-xl transition"}," Continuar comprando ",-1)])])):(r(),a("div",q,[t("div",z,[(r(!0),a(v,null,w(o(l),s=>(r(),a("div",{key:s.id,class:"bg-white rounded-2xl border border-gray-200 shadow-sm p-5"},[t("div",B,[t("div",E,[s.image?(r(),a("img",{key:0,src:s.image,alt:s.name,class:"w-full h-full object-cover"},null,8,L)):(r(),a("div",T," ð» "))]),t("div",P,[t("h3",Q,n(s.name),1),e[3]||(e[3]=t("p",{class:"text-xs text-gray-500 mt-1"},"Licença digital ⢠Entrega imediata",-1)),t("p",A,"R$ "+n(i(s.price)),1)]),t("div",D,[t("button",{onClick:m=>o(u)(s.id),class:"text-red-500 hover:text-red-700 text-sm font-medium transition"}," Remover ",8,G),t("div",I,[t("button",{onClick:m=>o(f)(s.id),class:"w-8 h-8 rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-700 font-bold transition flex items-center justify-center"}," - ",8,M),t("span",N,n(s.quantity),1),t("button",{onClick:m=>o(b)(s.id),class:"w-8 h-8 rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-700 font-bold transition flex items-center justify-center"}," + ",8,V)])])]),t("div",H,[e[4]||(e[4]=t("span",{class:"text-sm text-gray-500"},"Subtotal",-1)),t("span",J,"R$ "+n(i(s.price*s.quantity)),1)])]))),128))]),t("div",K,[t("div",O,[e[8]||(e[8]=t("h2",{class:"font-bold text-gray-800 mb-4 text-xs uppercase tracking-widest"},"Resumo do pedido",-1)),t("div",U,[t("div",W,[e[5]||(e[5]=t("span",{class:"text-gray-600"},"Subtotal",-1)),t("span",X,"R$ "+n(i(o(d))),1)]),e[6]||(e[6]=t("div",{class:"flex justify-between text-sm"},[t("span",{class:"text-gray-600"},"Entrega"),t("span",{class:"font-semibold text-green-600"},"Grátis")],-1))]),t("div",Y,[e[7]||(e[7]=t("span",{class:"text-sm font-black text-gray-900"},"Total",-1)),t("span",Z," R$ "+n(i(o(d))),1)]),t("button",{onClick:p,class:"w-full bg-green-600 hover:bg-green-700 text-white font-bold py-4 rounded-xl text-lg transition mb-3"}," Finalizar compra "),e[9]||(e[9]=t("a",{href:"/",class:"block w-full text-center text-gray-600 hover:text-blue-600 font-medium py-2 transition"}," Continuar comprando ",-1)),t("button",{onClick:e[0]||(e[0]=(...s)=>o(x)&&o(x)(...s)),class:"block w-full text-center text-red-500 hover:text-red-700 text-sm font-medium py-2 transition mt-2"}," Limpar carrinho ")])])]))])]))}});
1export{ot as default}; 2//# sourceMappingURL=Bds8zSsc.js.map
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.