import{S as e}from"./app-ad835f92.js";function c(t){return e.fire({title:"成功",icon:"success",confirmButtonText:"確認",customClass:{confirmButton:"btn btn-success"},buttonsStyling:!1}).then(t)}function r(t){let n="權限異常",o="",s=()=>{window.location="/"};if(t)switch(t.response.status){case 404:n="查無此頁";break;case 403:n="權限異常";break;case 401:case 419:return;case 500:n="發生錯誤",o=t.response.data.error??"",s=()=>{};break;default:n="發生錯誤",s=()=>{}}return e.fire({title:n,text:o,icon:"error",confirmButtonText:"確認",customClass:{confirmButton:"btn btn-danger"},buttonsStyling:!1}).then(s)}function u(t){return e.fire({title:"確認刪除？",icon:"warning",confirmButtonText:"確認",cancelButtonText:"取消",customClass:{confirmButton:"btn btn-danger ms-3",cancelButton:"btn btn-secondary"},showCancelButton:!0,reverseButtons:!0,buttonsStyling:!1}).then(t)}function i(t){return e.fire({title:"確認取消？",icon:"warning",confirmButtonText:"確認",cancelButtonText:"取消",customClass:{confirmButton:"btn btn-danger ms-3",cancelButton:"btn btn-secondary"},showCancelButton:!0,reverseButtons:!0,buttonsStyling:!1}).then(t)}function l(t){return e.fire({title:"警告",text:t,icon:"warning",confirmButtonText:"確認",customClass:{confirmButton:"btn btn-secondary"},buttonsStyling:!1})}export{r as a,u as b,l as c,i as d,c as s};
