import{d as o,u as d,g as l}from"./index-D01LF5Le.js";import{j as s}from"./wp-i18n-shim-DUX0OV_V.js";import{B as m,d as u}from"./Button-BveKhP38.js";import{L as c}from"./loader-circle-CcSu72zH.js";function v(e){const i=o(),t=d(),r=l();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,v as u};
//# sourceMappingURL=ActionButton-Cr4Z2a1F.js.map
