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