(globalThis["webpackChunkradmir_interfaces"]=globalThis["webpackChunkradmir_interfaces"]||[]).push([[7024],{727069:(s,t,e)=>{"use strict";e.r(t),e.d(t,{default:()=>x});var i=e(373396),a=e(87139),r=e(349242);const o=e.p+"assets/src/assets/images/clothing_shop/remove.svg",c=e.p+"assets/src/assets/images/clothing_shop/noCart.svg",n=e.p+"assets/src/assets/images/clothing_shop/confirm.svg",l=s=>((0,i.dD)("data-v-3ad5ae63"),s=s(),(0,i.Cn)(),s),d={class:"rows"},m={class:"row"},g={class:"row-title"},u=l((()=>(0,i._)("span",null,"₽",-1))),p={class:"items"},_=["onClick"],v=l((()=>(0,i._)("div",{class:"action"},[(0,i._)("img",{src:o,alt:""})],-1))),h={class:"item-image"},w=["src"],f={class:"item-data"},k={class:"price"},C=l((()=>(0,i._)("span",null,"₽",-1))),b={class:"desc"},D=l((()=>(0,i._)("img",{src:c,alt:""},null,-1))),y=[D],U=l((()=>(0,i._)("div",{class:"button"},[(0,i._)("button",null,[(0,i._)("img",{src:n,alt:""}),(0,i.Uk)(" Подтвердить ")])],-1)));function N(s,t,o,c,n,l){return(0,i.wg)(),(0,i.iD)("div",d,[(0,i._)("div",m,[(0,i._)("div",g,[(0,i.Uk)(" Ваши покупки "),(0,i._)("p",null,[(0,i.Uk)((0,a.zw)(l._formatNumber(n.priceSum)),1),u])]),(0,i._)("div",p,[((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(n.goods,((s,t)=>(0,i.wy)(((0,i.wg)(),(0,i.iD)("div",{onClick:s=>l.removeFromCart(t),class:"item",key:t,style:{"margin-left":"7px"}},[v,(0,i._)("div",h,[(0,i._)("img",{class:"image",src:e(884534)("./"+s.image),alt:""},null,8,w)]),(0,i._)("div",f,[(0,i._)("div",k,[(0,i.Uk)((0,a.zw)(l._formatNumber(s.price))+" ",1),C]),(0,i._)("div",b,(0,a.zw)(s.title),1)])],8,_)),[[r.F8,s.inCart]]))),128)),((0,i.wg)(!0),(0,i.iD)(i.HY,null,(0,i.Ko)(4-n.count,(s=>((0,i.wg)(),(0,i.iD)("div",{class:"item-empty",key:s},y)))),128))])]),U])}const F={name:"mainPage",props:["openGoods"],data(){return{goods:[],count:0,priceSum:0}},methods:{calc(){const s=this.goods.filter((s=>s.inCart));this.count=s.length,this.priceSum=s.reduce(((s,t)=>s+t.price),0)},removeFromCart(s){this.goods[s].inCart=!1,this.calc()},_formatNumber(s){return s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}},created(){this.openGoods&&(this.goods=this.openGoods),this.calc()}};var O=e(940089);const S=(0,O.Z)(F,[["render",N],["__scopeId","data-v-3ad5ae63"]]),x=S},884534:(s,t,e)=>{var i={"./1.svg":544332};function a(s){var t=r(s);return e(t)}function r(s){if(!e.o(i,s)){var t=new Error("Cannot find module '"+s+"'");throw t.code="MODULE_NOT_FOUND",t}return i[s]}a.keys=function(){return Object.keys(i)},a.resolve=r,s.exports=a,a.id=884534},544332:(s,t,e)=>{"use strict";s.exports=e.p+"assets/src/assets/images/clothing_shop/items/1.svg"}}]);