define(['exports', 'preact/jsx-runtime', 'preact', 'preact/compat', 'preact/hooks', './BaseButton-c86afd54', './useToggleAction-59741954', './useTooltip-7b915f4c', './useId-c9578d26', './mergeProps-bcfa6a92', './logger-0f873e29', './LayerHost-733ade2f', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-30886397', './toggleButtonUtils-0ebe4c56', './ToggleButtonLabel-2f0e4f18'], (function(e,t,o,s,i,l,a,n,c,r,d,g,p,u,b,h,T,f){"use strict";const m=s.forwardRef((({children:e,tooltip:s,size:d="md",isDisabled:g=!1,accessibleLabel:p,isSelected:u=!1,onToggle:b,testId:h,width:m,"aria-describedby":y},B)=>{const w=i.useRef(null);i.useImperativeHandle(B,(()=>w.current),[w]);const{triggerProps:S}=a.useToggleAction({isDisabled:g,onToggle:b}),{tooltipContent:I,tooltipProps:x}=n.useTooltip({text:s??p,isDisabled:g}),D=T.toggleStyling("auto",u,!0,!1,!1,void 0,void 0,!0),v={"aria-describedby":y};return t.jsxs(o.Fragment,{children:[t.jsx(l.BaseButton,{...r.mergeProps(x,S,v),elementDetails:{type:"button",isSwitch:!0},"aria-checked":u,variant:"ghost",size:d,isDisabled:g,styling:D,width:m,ref:w,"aria-label":p??s,testId:h,children:t.jsx(f.ToggleButtonLabel,{isDisabled:g,label:p??s,isToggle:!0,inputName:c.useId(),inputType:"switch",onAction:()=>b?.({value:u}),isSelected:u,display:"icons",startIcon:e,size:d})}),I]})}));m.displayName="IconSwitchButton",e.IconSwitchButton=m}));
//# sourceMappingURL=IconSwitchButton-1a400cdf.js.map
