1import{aA as P,ab as b,k as w,M as S,l as M,o as D,c as F,b as v,z as l,H as T,a7 as E,a as m,u as I,a8 as k,t as C,q as O,K as y,aB as $,aC as A}from"./BlTItqbz.js";import{_ as B}from"./C87FTAhn.js";import{_ as N}from"./DyaNjmKP.js";import"./D40_sJSY.js";import"./CRo2KBpe.js";import"./Bf6eIPn3.js";import"./D2IQBZQg.js";import"./Mn2v9qcs.js";import"./m67xPpjr.js";import"./BUpwRPbV.js";import"./DRnmGpmo.js";import"./BZWk-UA2.js";import"./_8f7_lO4.js";import"./-JifNNXO.js";import"./Bn_RaGbR.js";import"./CskOFXnJ.js";import"./iXuAhJ9z.js";import"./dm6-lfdJ.js";import"./C3s25Gk0.js";import"./BzBU-OYv.js";import"./DQ5ZPiLX.js";import"./BgONEwoo.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};r.SENTRY_RELEASE={id:"MA-UI production release e037953"};var s=new r.Error().stack;s&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[s]="834d6ef2-62d3-4b4c-9fc4-8528fbf1f69e",r._sentryDebugIdIdentifier="sentry-dbid-834d6ef2-62d3-4b4c-9fc4-8528fbf1f69e")}catch{}})();const U={class:"details-delivery"},V={class:"details-delivery__head"},de={__name:"DeliveryPrices",props:{methods:{type:Array,required:!0},prices:{type:Array,required:!0},productId:{type:String,required:!0},weight:{type:Number,default:0}},emits:["update:prices","methods-loaded","set-anchor"],setup(r,{emit:s}){const i=r,o=P(),f=b(),n=w(),a=y({get(){return o.deliveryPricesForProduct.id?o.deliveryPricesForProduct:null},set({id:t,title:e}){o.deliveryPricesForProduct.id=t,o.deliveryPricesForProduct.title=e}}),c=y(()=>o.deliveryPricesForProduct.allowedMethods.filter(t=>t.slug===$?i.weight<A:!0)),_=y(()=>c.value.length?i.methods.filter(t=>c.value.some(e=>e.slug===t.slug)):i.methods),u=s,h=async()=>{try{const e=(await f.fetchDeliveryPriceForProduct(i.productId)).map(({price:p,deliveryMethod:{slug:d}})=>({price:p,slug:d}));u("update:prices",e)}catch(t){O(t)}},g=t=>{o.deliveryPricesForProduct.allowedMethods=t,u("methods-loaded",c.value)};return S(()=>n.triedToRestoreSession,()=>{n.triedToRestoreSession&&n.isUserCityUnknown&&!a.value?.id&&(a.value=f.getDefaultCity())},{immediate:!0}),M(()=>{h()}),(t,e)=>{const p=E;return D(),F("div",U,[v("div",V,[l(p,null,{default:T(()=>[l(B,{modelValue:a.value,"onUpdate:modelValue":e[0]||(e[0]=d=>a.value=d),class:"details-delivery__head-change",onUpdateDeliveryMethods:g},null,8,["modelValue"])]),_:1}),e[2]||(e[2]=m()),v("span",{class:"available-in-shop-link",onClick:e[1]||(e[1]=d=>u("set-anchor","tabAvailableInShop"))},[l(I(k),{folder:"ma/svg",src:"ma_map-point-black.svg",alt:"location"}),m(" "+C(t.$t("ÐалиÑие в магазинаÑ
")),1)])]),e[3]||(e[3]=m()),l(N,{items:_.value,prices:r.prices,class:"details-delivery__options"},null,8,["items","prices"])])}}};export{de 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.