import{m as e,y as t}from"./utils-BakkG8Vx.js";import{d as n,i as r,y as i}from"./hooks.module-5xe-uC6c.js";import{t as a}from"./jsxRuntime.module--xb8gfv5.js";import{t as o}from"./ActionButton-CbWZL7Kr.js";import{t as s}from"./Icon-rHGhZ_GT.js";n();var c=t();function l({name:e,buttonRef:t,className:n,text:o,onClick:l,keyboardShortcut:u,icon:d,kind:f,disabled:p,size:m,style:h,triggerCommand:g,..._}){let v=r(()=>{let e=[`btn`];switch(f){case`primary`:e.push(`btn-primary`);break;case`lowProfile`:e.push(`tn-low-profile`);break;default:e.push(`btn-secondary`);break}return n&&e.push(n),m===`small`?e.push(`btn-sm`):m===`micro`&&e.push(`btn-micro`),e.join(` `)},[f,n,m]),y=r(()=>{if(!u||c)return null;let e=u.split(`+`);return e.map((t,n)=>a(i,{children:[a(`kbd`,{children:t.toUpperCase()},n),n<e.length-1?`+`:``]}))},[u]);return a(`button`,{name:e,className:v,type:l||g?`button`:`submit`,onClick:l,ref:t,disabled:p,style:h,"data-trigger-command":g,..._,children:[d&&a(s,{icon:`bx ${d}`}),o,` `,y]})}function u({size:e,className:t,children:n}){return a(`div`,{className:`btn-group ${e?`btn-group-${e}`:``} ${t??``}`,role:`group`,children:n})}function d({text:e,icon:t,children:n,...r}){return a(u,{children:[a(`button`,{type:`button`,class:`btn btn-secondary`,...r,children:[t&&a(s,{icon:`bx ${t}`}),e]}),a(`button`,{type:`button`,class:`btn btn-secondary dropdown-toggle dropdown-toggle-split`,"data-bs-toggle":`dropdown`,"aria-expanded":`false`,children:a(`span`,{class:`visually-hidden`,children:`Toggle Dropdown`})}),a(`ul`,{class:`dropdown-menu`,children:n})]})}function f(t){return e()?a(l,{...t}):a(o,{...t})}export{d as i,u as n,f as r,l as t};