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