module.exports=[97378,a=>{"use strict";var b=a.i(87924),c=a.i(72131),d=a.i(23025),e=a.i(15618);let f=(0,a.i(70106).default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var g=a.i(46271),h=a.i(62036),i=a.i(94845);a.s(["QuotationWidget",0,({product:a})=>{let[j,k]=(0,c.useState)(0),[l,m]=(0,c.useState)(!1),{addItem:n}=(0,i.useQuotation)();return(0,b.jsxs)("div",{className:"bg-gray-100 p-8 rounded-2xl h-full flex flex-col justify-center items-center text-center relative overflow-hidden",children:[(0,b.jsx)("h3",{className:"text-gray-900 font-bold uppercase tracking-widest mb-4 text-sm",children:"COTIZA ESTE PRODUCTO"}),(0,b.jsx)("p",{className:"text-xs text-gray-500 mb-6 uppercase tracking-tighter",children:"Indica las unidades que necesitas"}),(0,b.jsxs)("div",{className:"flex items-center gap-4 mb-8",children:[(0,b.jsx)("button",{onClick:()=>k(a=>a>0?a-1:0),className:"w-10 h-10 rounded-full bg-white shadow-sm border border-gray-200 flex items-center justify-center text-red-600 hover:bg-red-50 transition-colors",children:(0,b.jsx)(d.Minus,{size:20,strokeWidth:3})}),(0,b.jsx)("div",{className:"bg-white px-6 py-3 rounded-full border border-gray-200 shadow-inner min-w-[140px] flex items-center",children:(0,b.jsx)("input",{type:"number",value:0===j?"":j,placeholder:"0",onChange:a=>{let b=parseInt(a.target.value);k(isNaN(b)?0:b)},className:"w-full bg-transparent text-center text-xl font-bold text-gray-800 outline-none [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",min:"0"})}),(0,b.jsx)("button",{onClick:()=>k(a=>a+1),className:"w-10 h-10 rounded-full bg-white shadow-sm border border-gray-200 flex items-center justify-center text-red-600 hover:bg-red-50 transition-colors",children:(0,b.jsx)(e.Plus,{size:20,strokeWidth:3})})]}),(0,b.jsxs)(g.motion.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>{j<=0||(n({productId:a.id,name:a.nombre,image:a.imagen,quantity:j,specs:a.especificaciones}),m(!0),setTimeout(()=>m(!1),3e3))},disabled:j<=0,className:`w-full py-4 rounded-full font-bold flex items-center justify-center gap-3 shadow-lg transition-all uppercase tracking-widest text-sm ${j>0?"bg-red-600 text-white shadow-red-200 hover:bg-red-700":"bg-gray-300 text-gray-500 cursor-not-allowed shadow-none"}`,children:[(0,b.jsx)(e.Plus,{size:18,strokeWidth:3}),"Añadir a la cotización"]}),(0,b.jsx)(h.AnimatePresence,{children:l&&(0,b.jsxs)(g.motion.div,{initial:{y:50,opacity:0},animate:{y:0,opacity:1},exit:{y:50,opacity:0},className:"absolute inset-x-0 bottom-0 bg-green-600 text-white py-2 flex items-center justify-center gap-2",children:[(0,b.jsx)(f,{size:16}),(0,b.jsx)("span",{className:"text-xs font-bold uppercase tracking-widest",children:"¡Agregado con éxito!"})]})})]})}],97378)}];

//# sourceMappingURL=src_components_productos_QuotationWidget_tsx_b96fc453._.js.map