import{d as e,i as t}from"./hooks.module-BrXTvcfS.js";import{k as n,w as r}from"./i18n-BaLR3UdQ.js";import{t as i}from"./jsxRuntime.module-Cao1NCKs.js";import{t as a}from"./ActionButton-DqIfNt93.js";import{t as o}from"./Icon-BEnt7704.js";import{t as s}from"./shortcut_kbd-CxTqyPZL.js";e();var c=n();function l({name:e,buttonRef:n,className:r,text:a,onClick:l,keyboardShortcut:u,icon:d,kind:f,disabled:p,size:m,style:h,triggerCommand:g,..._}){let v=t(()=>{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 r&&e.push(r),m===`small`?e.push(`btn-sm`):m===`micro`&&e.push(`btn-micro`),e.join(` `)},[f,r,m]),y=t(()=>!u||c?null:s(u),[u]);return i(`button`,{name:e,className:v,type:l||g?`button`:`submit`,onClick:l,ref:n,disabled:p,style:h,"data-trigger-command":g,..._,children:[d&&i(o,{icon:`bx ${d}`}),a,` `,y]})}function u({size:e,className:t,children:n}){return i(`div`,{className:`btn-group ${e?`btn-group-${e}`:``} ${t??``}`,role:`group`,children:n})}function d({text:e,icon:t,children:n,...r}){return i(u,{children:[i(`button`,{type:`button`,class:`btn btn-secondary`,...r,children:[t&&i(o,{icon:`bx ${t}`}),e]}),i(`button`,{type:`button`,class:`btn btn-secondary dropdown-toggle dropdown-toggle-split`,"data-bs-toggle":`dropdown`,"aria-expanded":`false`,children:i(`span`,{class:`visually-hidden`,children:`Toggle Dropdown`})}),i(`ul`,{class:`dropdown-menu`,children:n})]})}function f(e){return r()?i(l,{...e}):i(a,{...e})}export{d as i,u as n,f as r,l as t};