import{u as h,s as m,A as _}from"./Bgmy51Qv.js";import{u as y}from"./DKgjlGGV.js";function w(){const g=()=>{var e,n;const t=(n=(e=Intl.DateTimeFormat())==null?void 0:e.resolvedOptions())==null?void 0:n.timeZone;return t==="Asia/Calcutta"?"Asia/Kolkata":t},f=h(),{currencyPositionsIn:v,featuredObj:p,statusObj:I,priceTFormat:b,verifiedObj:S,booleanObj:F}=y(),{setting:a}=m(f),u=t=>{var e,n,o,r,s;return parseInt((e=a.value)==null?void 0:e.currency_position)===v.PRE?((n=a.value)==null?void 0:n.currency_icon)+c(t,(o=a.value)==null?void 0:o.decimal_format):c(t,(r=a.value)==null?void 0:r.decimal_format)+((s=a.value)==null?void 0:s.currency_icon)},T=({type:t,price:e})=>b.PERCENT===parseInt(t)?`${e}%`:u(e),c=(t,e="en-US")=>(e||(e="en-US"),parseFloat(t).toLocaleString(e,{maximumFractionDigits:2})),U=t=>t==null?void 0:t.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,""),d=t=>t&&p[t].title,O=t=>t&&I[t].title,R=t=>S[t].title,j=t=>F[t].title,{imgSrcUrl:i,thumbPrefix:L,defaultImage:l}=m(_());return{getTimeZone:g,priceFormatting:u,convertToSlug:U,getFeatured:d,getStatus:O,getVerificationStatus:R,getBoolean:j,getThumbImageURL:(t=null)=>i.value+L.value+t||l.value,priceFormat:T,getDataFromObject:(t,e,n=null)=>{const o=e.split(".");let r=t;return o==null||o.forEach(s=>{if(!r||r[s]===void 0)return r=n,!1;r=r[s]}),r??n},getImageName:t=>{const e=t.split("/");return e[e.length-1]},getImageURL:(t=null)=>i.value+(t||l.value)}}export{w as u};
