import{defineProperty as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import{getTestId as t,ComponentDefaultTestId as r}from"../../../tests/testIds.js";import o from"classnames";import s,{useRef as i}from"react";import a from"../../Tooltip/Tooltip.js";import n from"../../../hooks/useIsOverflowing/useIsOverflowing.js";import m from"./AlertBannerText.module.scss.js";var l=function(l){var f=l.text,p=l.marginLeft,d=void 0!==p&&p,u=l.id,c=l["data-testid"],g=l.ariaLive,v=i(null),T=o(m.bannerText,e({},m.marginLeft,d)),j=n({ref:v});return s.createElement(a,{position:"bottom",content:j&&f,showTrigger:["mouseenter"],hideTrigger:["mouseleave"]},s.createElement("div",{ref:v,className:T,id:u,"data-testid":c||t(r.ALERT_BANNER_TEXT,u)},s.createElement("span",{"aria-live":g},f)))};Object.assign(l,{isAlertBannerItem:!0,isAlertBannerText:!0});export{l as default};
//# sourceMappingURL=AlertBannerText.js.map
