import{f as l}from"./BCLrUOBx.js";function g({product:r,productInventory:u}){const p=l(()=>{var e,a,o,f;return((a=(e=u.value)==null?void 0:e.inventory_attributes)==null?void 0:a.length)>0&&((o=u.value)==null?void 0:o.price)>0?(f=u.value)==null?void 0:f.price:r.value.price>0?r.value.price:r.value.offered>0?r.value.offered:r.value.selling}),P=l(()=>100-parseInt((i.value/s.value*100).toString())),n=l(()=>{var e,a;return((e=r.value)==null?void 0:e.price)!==null?parseFloat((a=r.value)==null?void 0:a.price):null}),t=l(()=>{var e;return parseFloat(((e=r.value)==null?void 0:e.selling)||0)}),v=l(()=>{var e;return parseFloat(((e=r.value)==null?void 0:e.offered)||0)}),s=l(()=>parseFloat(v.value>0||n.value?t.value:0)),i=l(()=>parseFloat(n.value!==null?n.value:v.value>0?v.value:t.value)),c=l(()=>{var e,a;return((e=inventory.value)==null?void 0:e.inventory_attributes.length)>0&&parseFloat((a=inventory.value)==null?void 0:a.price)||0});return l(()=>parseFloat(c.value>0?c.value:i.value)),{prevPrice:s,currentPricing:i,reducedPercent:P,productPrice:p}}export{g as u};
