import{f as d,g as v}from"./9wDxnFtt.js";import{b as s}from"./pvhYMo2c.js";const w=d("offers",()=>{const{$axios:r}=v(),n=s({}),o=s(),f=s(!0),t=s(!0),u=s([]);async function i(e){const a=await r.get(`offer/show/${e}`);a.status>=200&&(o.value=a.data.data,t.value=!1),setTimeout(()=>{t.value=!0},500)}async function c(e){const a=await r.get(`offer/show/${e}`);a.status>=200&&(o.value=a.data.data,t.value=!1),setTimeout(()=>{t.value=!0},500)}function l(e){return e?e.toString().toLowerCase().trim().replace(/\s+/g,"-").replace(/[؟,،!%&]/g,"").replace(/-+/g,"-"):""}async function g(){const e=await r.get("offers");e.status>=200&&(u.value=e.data.data,f.value=!1),setTimeout(()=>{f.value=!0},500)}return{errors:n,isLoading:f,isLoading2:t,getOffer:i,getOfferBySlug:c,getOffers:g,offers:u,offer:o,slugify:l}});export{w as u};
