import{e as i,p as s,dP as o}from"./chunk-ZZOTL0WJ.js";const n="data:image/svg+xml,%3csvg%20width='343'%20height='360'%20viewBox='0%200%20343%20360'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='343'%20height='360'%20fill='white'/%3e%3crect%20x='76.5'%20y='75.8589'%20width='191'%20height='191'%20rx='95.5'%20fill='%23F5F6F7'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M139%20150.344C139%20147.039%20141.69%20144.359%20145.003%20144.359H198.997C202.312%20144.359%20205%20147.037%20205%20150.344V192.374C205%20195.679%20202.31%20198.359%20198.997%20198.359H145.003C141.688%20198.359%20139%20195.681%20139%20192.374V150.344ZM145%20192.374L198.997%20192.359C199.002%20192.359%20199%20150.344%20199%20150.344L145.003%20150.359C144.998%20150.359%20145%20192.374%20145%20192.374ZM160.083%20163.567C160.823%20162.082%20162.144%20162.016%20163.022%20163.4L168.119%20171.438C169.003%20172.831%20170.859%20173.251%20172.276%20172.371L175.243%20170.526C176.655%20169.648%20178.572%20170.02%20179.543%20171.383L186.335%20180.912C187.298%20182.264%20186.732%20183.359%20185.077%20183.359H153.224C151.566%20183.359%20150.824%20182.15%20151.562%20180.669L160.083%20163.567ZM188.5%20168.359C186.015%20168.359%20184%20166.344%20184%20163.859C184%20161.374%20186.015%20159.359%20188.5%20159.359C190.985%20159.359%20193%20161.374%20193%20163.859C193%20166.344%20190.985%20168.359%20188.5%20168.359Z'%20fill='%23E0E4E7'/%3e%3crect%20x='76.5'%20y='75.8589'%20width='191'%20height='191'%20rx='95.5'%20stroke='%23E0E4E7'/%3e%3c/svg%3e",u=r=>{let t;if(r.image_links==="null"||!r.image_links)t=n;else{const e=JSON.parse(r.image_links);t=Array.isArray(e)&&e.length>0?e[0].thumbnail_image_link:n}return t},h=(r,t)=>{const{price_whole:e,price_retail:l}=r||{},a=e?i(s(e))+" ₸":"",c=l?i(s(l))+" ₸":"";return t===o.whole?a:c},m=r=>{if(!r)return null;const t=JSON.parse(r);if(t===null||t.length===0)return null;const e=t.sort((l,a)=>l.name.localeCompare(a.name)).filter(l=>l.value!=="0"&&l.value!=="[]")[0];return e&&{name:e.name,value:e.value.replace(/[\[\]'"]+/g," ")}};export{u as a,n as e,h as g,m as s};
