import{f as o,u as l,i as d}from"./index-CM0LBdHD.js";import{j as s}from"./client-BbMi5ewG.js";import{B as m,l as u}from"./Button-1dacbE2T.js";import{L as c}from"./loader-circle--S58donA.js";function g(e){const i=o(),t=l(),r=d();return{mode:r.pathname.includes("create")?"create":r.pathname.includes("edit")?"edit":r.pathname.includes("details")?"details":i.id?"view":"list",id:i.id,navigateTo:{list:()=>t(`${e}`),create:()=>t(`${e}/create`),edit:a=>t(`${e}/${a}/edit`),view:a=>t(`${e}/${a}`),details:a=>t(`${e}/${a}/details`)}}}const p={primary:"h-10 px-4 bg-primary hover:bg-[#1e40af] text-white rounded-lg shadow-sm transition-all disabled:opacity-50 hover:text-white text-[13px] font-medium",cancel:"h-10 px-4 border border-border hover:border-slate-300 text-slate-600 bg-white rounded-lg transition-all hover:bg-slate-50 text-[13px] font-medium",outline:"h-10 px-4 border border-slate-300 text-slate-600 rounded-lg hover:bg-slate-50 transition-all text-[13px] font-medium"},b=({label:e,icon:i,onClick:t,loading:r=!1,variant:n="primary"})=>s.jsxs(m,{onClick:t,variant:"outline",className:u(p[n],"inline-flex items-center gap-1.5 !py-3"),disabled:r,children:[r?s.jsx(c,{className:"h-3.5 w-3.5 animate-spin"}):i&&s.jsx(i,{className:"w-3.5 h-3.5"}),s.jsx("span",{children:e})]});export{b as A,g as u};
//# sourceMappingURL=ActionButton-CK3Uoxvt.js.map
