import{f,g}from"./9wDxnFtt.js";import{b as r}from"./pvhYMo2c.js";const S=f("service",()=>{const{$axios:l}=g(),c=r({}),a=r(!1),u=r([]),t=r(null);async function n(){a.value=!0;const e=await l.get("services");e.status>=200&&(u.value=e.data.data,a.value=!1)}async function i(e){a.value=!0;try{const s=await l.get(`/services/${e}`);s.data?.message==="Service Not Found"?t.value=null:t.value=s.data.data}catch{t.value=null}finally{a.value=!1}}async function o(e){a.value=!0;try{const s=await l.get(`/services/show/${e}`);s.data?.message==="Service Not Found"?t.value=null:t.value=s.data.data}catch{t.value=null}finally{a.value=!1}}function v(e){return e.toString().toLowerCase().trim().replace(/\s+/g,"-").replace(/[؟,،!%&]/g,"").replace(/-+/g,"-")}return{errors:c,isLoading:a,services:u,service:t,getServices:n,getServiceById:i,getServiceBySlug:o,slugify:v}});export{S as u};
