"use strict";var N=Object.create;var r=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var O=Object.getPrototypeOf;var R=Object.prototype.hasOwnProperty;var y=(t,e)=>r(t,"name",{value:e,configurable:true});var P=(t,e)=>{for(var s in e)r(t,s,{get:e[s],enumerable:true})};var C=(t,e,s,i)=>{if(e&&typeof e==="object"||typeof e==="function"){for(let o of D(e))if(!R.call(t,o)&&o!==s)r(t,o,{get:()=>e[o],enumerable:!(i=v(e,o))||i.enumerable})}return t};var f=(t,e,s)=>(s=t!=null?N(O(t)):{},C(e||!t||!t.__esModule?r(s,"default",{value:t,enumerable:true}):s,t));var S=t=>C(r({},"__esModule",{value:true}),t);var g=(t,e,s,i)=>{var o=i>1?void 0:i?v(e,s):e;for(var m=t.length-1,a;m>=0;m--)if(a=t[m])o=(i?a(e,s,o):a(o))||o;if(i&&o)r(e,s,o);return o};var W={};P(W,{default:()=>I});module.exports=S(W);var n=require("react/jsx-runtime");var d=require("@mdi/js");var h=f(require("classnames"));var c=require("lodash");var x=require("mobx-react");var L=require("react");var p=require("react-intl");var k=require("../../config");var u=f(require("./icon"));var M=f(require("./loader/index"));const A={"checkbox-marked-circle-outline":d.mdiCheckboxMarkedCircleOutline,alert:d.mdiAlert};const H=(0,p.defineMessages)({dismiss:{id:"infobox.dismiss",defaultMessage:"Dismiss"}});let l=class extends L.Component{constructor(e){super(e);this.state={dismissed:false}}componentDidMount(){const{onSeen:e=c.noop}=this.props;e()}render(){const{children:e,icon:s="",type:i="primary",dismissible:o=false,ctaOnClick:m=c.noop,ctaLabel:a="",ctaLoading:_=false,onDismiss:b=c.noop,intl:E}=this.props;if(this.state.dismissed){return null}return(0,n.jsxs)("div",{className:(0,h.default)({infobox:true,[`infobox--${i}`]:i,"infobox--default":!i}),children:[s&&(0,n.jsx)(u.default,{icon:A[s]}),(0,n.jsx)("div",{className:"infobox__content",children:e}),a&&(0,n.jsx)("button",{className:"infobox__cta",onClick:m,type:"button",children:(0,n.jsxs)("div",{className:"contentWrapper",style:{display:"flex",gap:"8px"},children:[(0,n.jsx)(M.default,{size:18,loaded:!_,color:k.DEFAULT_LOADER_COLOR}),a]})}),o&&(0,n.jsx)("button",{type:"button",onClick:()=>{this.setState({dismissed:true});if(b)b()},className:"infobox__delete","aria-label":E.formatMessage(H.dismiss),children:(0,n.jsx)(u.default,{icon:d.mdiClose})})]})}};y(l,"Infobox");l=g([x.observer],l);var I=(0,p.injectIntl)(l);
