"use strict";(()=>{var m=Object.defineProperty,M=Object.defineProperties;var y=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,I=Object.prototype.propertyIsEnumerable;var g=(c,e,s)=>e in c?m(c,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):c[e]=s,d=(c,e)=>{for(var s in e||(e={}))B.call(e,s)&&g(c,s,e[s]);if(p)for(var s of p(e))I.call(e,s)&&g(c,s,e[s]);return c},f=(c,e)=>M(c,y(e));(self.webpackChunk_sap_ux_ui_components=self.webpackChunk_sap_ux_ui_components||[]).push([[733],{"./src/components/UIMessageBar/UIMessageBar.tsx":(function(c,e,s){var i=this&&this.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(e,"__esModule",{value:!0}),e.UIMessageBar=e.UIMessageBarType=void 0;const u=i(s("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),t=s("../../node_modules/.pnpm/@fluentui+react@8.120.5_@types+react-dom@16.9.24_@types+react@16.14.55_react-dom@16.14.0_react@16.14.0/node_modules/@fluentui/react/lib-commonjs/index.js");Object.defineProperty(e,"UIMessageBarType",{enumerable:!0,get:function(){return t.MessageBarType}});const a=s("./src/components/Icons.tsx");class o extends u.default.Component{constructor(r){super(r),this.setStyle=_=>{const{messageBarType:l}=_;return{root:d({},(l===t.MessageBarType.error||l===t.MessageBarType.success||l===t.MessageBarType.info||l===t.MessageBarType.warning)&&{backgroundColor:"transparent"}),innerText:{fontSize:13,lineHeight:18,color:"var(--vscode-foreground)",selectors:{p:{margin:0}}}}}}getMessageTypeIcon(r){switch(r){case t.MessageBarType.error:return a.UiIcons.Error;case t.MessageBarType.info:return a.UiIcons.Info;case t.MessageBarType.warning:return a.UiIcons.Warning;default:return a.UiIcons.Success}}render(){const r=this.getMessageTypeIcon(this.props.messageBarType);return u.default.createElement(t.MessageBar,f(d({},this.props),{messageBarIconProps:{iconName:r},styles:this.setStyle(this.props)}),this.props.children)}}e.UIMessageBar=o}),"./src/components/UIMessageBar/index.tsx":(function(c,e,s){var i=this&&this.__createBinding||(Object.create?(function(t,a,o,n){n===void 0&&(n=o);var r=Object.getOwnPropertyDescriptor(a,o);(!r||("get"in r?!a.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return a[o]}}),Object.defineProperty(t,n,r)}):(function(t,a,o,n){n===void 0&&(n=o),t[n]=a[o]})),u=this&&this.__exportStar||function(t,a){for(var o in t)o!=="default"&&!Object.prototype.hasOwnProperty.call(a,o)&&i(a,t,o)};Object.defineProperty(e,"__esModule",{value:!0}),u(s("./src/components/UIMessageBar/UIMessageBar.tsx"),e)}),"./stories/UIMessageBar.story.tsx":(function(c,e,s){var i=this&&this.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.defaultUsage=void 0;const u=i(s("../../node_modules/.pnpm/react@16.14.0/node_modules/react/index.js")),t=s("../../node_modules/.pnpm/@fluentui+react@8.120.5_@types+react-dom@16.9.24_@types+react@16.14.55_react-dom@16.14.0_react@16.14.0/node_modules/@fluentui/react/lib-commonjs/index.js"),a=s("./src/components/UIMessageBar/index.tsx");e.default={title:"Utilities/MessageBar"};const o={childrenGap:40},n=()=>u.default.createElement(t.Stack,{tokens:o},u.default.createElement(a.UIMessageBar,{messageBarType:t.MessageBarType.success},u.default.createElement("div",null,"Success message bar")),u.default.createElement(a.UIMessageBar,{messageBarType:t.MessageBarType.error},u.default.createElement("div",null,"Error message bar")));e.defaultUsage=n})}]);})();
