import{n as e}from"./chunk-DrgAwqJ9.js";import{n as t,t as n}from"./jsx-runtime-C3uB2UIS.js";import{d as r}from"./useTranslation-DVVidJl_.js";import{t as i}from"./Tooltip-Lf-InH2_.js";import{t as a}from"./UnstyledButton-BprPCIHx.js";var o=`_destructive_1215g_95`,s={"icon-button":`_icon-button_1215g_8`,"no-background":`_no-background_1215g_42`,destructive:o},c={"indicator-icon":`_indicator-icon_147l5_17`},l=n(),u=e(t(),1),d=e(r(),1),f=(0,u.forwardRef)(function({children:e,className:t,size:n=`100%`,colour:r,indicator:i},a){return(0,l.jsx)(`div`,{ref:a,className:(0,d.default)(c[`indicator-icon`],t),"data-indicator":i,style:{"--cpd-icon-button-size":n,"--cpd-color-icon-tertiary":r},children:u.Children.only(e)})}),p=(0,u.forwardRef)(function({kind:e=`primary`,children:t,className:n,indicator:r,size:o=`32px`,style:c,disabled:p,destructive:m,tooltip:h,noBackground:g=!1,..._},v){let y=(0,l.jsx)(a,{as:`button`,ref:v,className:(0,d.default)(s[`icon-button`],n,{[s.destructive]:m,[s[`no-background`]]:g}),style:{"--cpd-icon-button-size":o,...c},disabled:p,..._,"data-indicator":r,"data-kind":e,children:(0,l.jsx)(f,{indicator:r,colour:p?`var(--cpd-color-icon-disabled)`:void 0,children:u.Children.only(t)})});return h?(0,l.jsx)(i,{label:h,children:y}):y});export{p as t};
//# sourceMappingURL=IconButton-DsXdt-tQ.js.map