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