import{o as e}from"./rolldown-runtime.C0FnF6B9.js";import{r as t}from"./emotion-is-prop-valid.esm.CuYlOKOk.js";import{a as n,i as r,r as i,t as a}from"./emotion-styled.browser.esm.BYv_Qzcq.js";import{r as o}from"./StreamlitMarkdown.BYA62LKI.js";import{t as s}from"./DynamicIcon.qdIiJ9dI.js";import{t as c}from"./useEmotionTheme.Dmt_qJ4x.js";import{r as l,s as u}from"./ErrorElement.Bn6KKjq6.js";var d=e(t(),1),f=a(`div`,{target:`ee8gipb0`})(({theme:e,$hasTitle:t})=>({display:`flex`,flexDirection:t?`column`:`row`,gap:t?e.spacing.twoXS:e.spacing.sm,width:`100%`,[`${u} code`]:{paddingRight:e.spacing.lg}})),p=a(`div`,{target:`ee8gipb1`})(({theme:e})=>({display:`flex`,alignItems:`flex-start`,gap:e.spacing.sm})),m=a(`div`,{target:`ee8gipb2`})(({theme:e})=>({position:`relative`,top:e.spacing.threeXS,flexShrink:0})),h=a(`strong`,{target:`ee8gipb3`})(({theme:e})=>({fontSize:e.fontSizes.md,"& p":{fontWeight:e.fontWeights.bold}})),g=a(`div`,{target:`ee8gipb4`})({width:`100%`});function _({icon:e,body:t,title:a,kind:u}){let d=c(),_=e?{width:`calc(100% - (${d.iconSizes.lg} + ${d.spacing.sm}))`}:void 0,v=e?r(m,{children:r(s,{iconValue:e,size:`lg`,testid:`stAlertDynamicIcon`})}):null;return r(`div`,{className:`stAlert`,"data-testid":`stAlert`,children:r(l,{kind:u,children:r(f,{$hasTitle:!!a,children:a?n(i,{children:[n(p,{children:[v,r(h,{"data-testid":`stAlertTitle`,children:r(o,{source:a,allowHTML:!1,isLabel:!0,inheritFont:!0})})]}),r(g,{children:r(o,{source:t,allowHTML:!1})})]}):n(i,{children:[v,r(o,{source:t,allowHTML:!1,style:_})]})})})})}var v=(0,d.memo)(_);export{v as t};