import{u as o}from"./tpFEFzWU.js";const c=()=>{const{t:e}=o(),s=i=>{if(!i)return e("notify.error");const r=i.toLowerCase();if(r.includes("wip limit")){const n=i.match(/(\d+)\s+issue/),t=n?n[1]:"1";return e("apiError.wipLimit",{count:t})}return r.includes("cannot skip")||r.includes("cannot move from")?e("apiError.cannotSkip"):r.includes("acceptance criteria required")?e("apiError.acceptanceCriteriaRequired"):r.includes("not found")&&r.includes("issue")?e("apiError.issueNotFound"):r.includes("required")&&r.includes("column")?e("apiError.columnRequired"):r.includes("move")&&r.includes("failed")?e("apiError.moveFailed"):r.includes("save")&&r.includes("failed")?e("apiError.saveFailed"):r.includes("delete")&&r.includes("failed")?e("apiError.deleteFailed"):i};return{translateError:s,getErrorMessage:(i,r)=>{const n=i?.data?.message;if(n)return s(n);const t=i?.message;return t?s(t):r||e("notify.error")}}};export{c as u};
