{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n tag: tagPropType,\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n wrapTag: tagPropType,\n toggle: PropTypes.func,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n children: PropTypes.node,\n closeAriaLabel: PropTypes.string,\n charCode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n close: PropTypes.object\n};\nvar defaultProps = {\n tag: 'strong',\n wrapTag: 'div',\n tagClassName: 'mr-auto',\n closeAriaLabel: 'Close',\n charCode: 215\n};\n\nvar ToastHeader = function ToastHeader(props) {\n var closeButton;\n var icon;\n\n var className = props.className,\n cssModule = props.cssModule,\n children = props.children,\n toggle = props.toggle,\n Tag = props.tag,\n WrapTag = props.wrapTag,\n closeAriaLabel = props.closeAriaLabel,\n charCode = props.charCode,\n close = props.close,\n tagClassName = props.tagClassName,\n iconProp = props.icon,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"children\", \"toggle\", \"tag\", \"wrapTag\", \"closeAriaLabel\", \"charCode\", \"close\", \"tagClassName\", \"icon\"]);\n\n var classes = mapToCssModules(classNames(className, 'toast-header'), cssModule);\n\n if (!close && toggle) {\n var closeIcon = typeof charCode === 'number' ? String.fromCharCode(charCode) : charCode;\n closeButton = /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n onClick: toggle,\n className: mapToCssModules('close', cssModule),\n \"aria-label\": closeAriaLabel\n }, /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\"\n }, closeIcon));\n }\n\n if (typeof iconProp === \"string\") {\n icon = /*#__PURE__*/React.createElement(\"svg\", {\n className: mapToCssModules(\"rounded text-\" + iconProp),\n width: \"20\",\n height: \"20\",\n xmlns: \"http://www.w3.org/2000/svg\",\n preserveAspectRatio: \"xMidYMid slice\",\n focusable: \"false\",\n role: \"img\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n fill: \"currentColor\",\n width: \"100%\",\n height: \"100%\"\n }));\n } else if (iconProp) {\n icon = iconProp;\n }\n\n return /*#__PURE__*/React.createElement(WrapTag, _extends({}, attributes, {\n className: classes\n }), icon, /*#__PURE__*/React.createElement(Tag, {\n className: mapToCssModules(classNames(tagClassName, {\n \"ml-2\": icon != null\n }), cssModule)\n }, children), close || closeButton);\n};\n\nToastHeader.propTypes = propTypes;\nToastHeader.defaultProps = defaultProps;\nexport default ToastHeader;","map":{"version":3,"sources":["/app/node_modules/reactstrap/es/ToastHeader.js"],"names":["_extends","_objectWithoutPropertiesLoose","React","PropTypes","classNames","mapToCssModules","tagPropType","propTypes","tag","icon","oneOfType","string","node","wrapTag","toggle","func","className","cssModule","object","children","closeAriaLabel","charCode","number","close","defaultProps","tagClassName","ToastHeader","props","closeButton","Tag","WrapTag","iconProp","attributes","classes","closeIcon","String","fromCharCode","createElement","type","onClick","width","height","xmlns","preserveAspectRatio","focusable","role","fill"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,6BAAP,MAA0C,yDAA1C;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAASC,eAAT,EAA0BC,WAA1B,QAA6C,SAA7C;AACA,IAAIC,SAAS,GAAG;AACdC,EAAAA,GAAG,EAAEF,WADS;AAEdG,EAAAA,IAAI,EAAEN,SAAS,CAACO,SAAV,CAAoB,CAACP,SAAS,CAACQ,MAAX,EAAmBR,SAAS,CAACS,IAA7B,CAApB,CAFQ;AAGdC,EAAAA,OAAO,EAAEP,WAHK;AAIdQ,EAAAA,MAAM,EAAEX,SAAS,CAACY,IAJJ;AAKdC,EAAAA,SAAS,EAAEb,SA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AAI,EAAE,cADoC;AAE1CN,MAAAA,KAAK,EAAE,MAFmC;AAG1CC,MAAAA,MAAM,EAAE;AAHkC,KAA5B,CARI,CAApB;AAaD,GAdD,MAcO,IAAIV,QAAJ,EAAc;AACnBtB,IAAAA,IAAI,GAAGsB,QAAP;AACD;;AAED,SAAO,aAAa7B,KAAK,CAACmC,aAAN,CAAoBP,OAApB,EAA6B9B,QAAQ,CAAC,EAAD,EAAKgC,UAAL,EAAiB;AACxEhB,IAAAA,SAAS,EAAEiB;AAD6D,GAAjB,CAArC,EAEhBxB,IAFgB,EAEV,aAAaP,KAAK,CAACmC,aAAN,CAAoBR,GAApB,EAAyB;AAC9Cb,IAAAA,SAAS,EAAEX,eAAe,CAACD,UAAU,CAACqB,YAAD,EAAe;AAClD,cAAQhB,IAAI,IAAI;AADkC,KAAf,CAAX,EAEtBQ,SAFsB;AADoB,GAAzB,EAIpBE,QAJoB,CAFH,EAMNI,KAAK,IAAIK,WANH,CAApB;AAOD,CAxDD;;AA0DAF,WAAW,CAACnB,SAAZ,GAAwBA,SAAxB;AACAmB,WAAW,CAACF,YAAZ,GAA2BA,YAA3B;AACA,eAAeE,WAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n tag: tagPropType,\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n wrapTag: tagPropType,\n toggle: PropTypes.func,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n children: PropTypes.node,\n closeAriaLabel: PropTypes.string,\n charCode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n close: PropTypes.object\n};\nvar defaultProps = {\n tag: 'strong',\n wrapTag: 'div',\n tagClassName: 'mr-auto',\n closeAriaLabel: 'Close',\n charCode: 215\n};\n\nvar ToastHeader = function ToastHeader(props) {\n var closeButton;\n var icon;\n\n var className = props.className,\n cssModule = props.cssModule,\n children = props.children,\n toggle = props.toggle,\n Tag = props.tag,\n WrapTag = props.wrapTag,\n closeAriaLabel = props.closeAriaLabel,\n charCode = props.charCode,\n close = props.close,\n tagClassName = props.tagClassName,\n iconProp = props.icon,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"children\", \"toggle\", \"tag\", \"wrapTag\", \"closeAriaLabel\", \"charCode\", \"close\", \"tagClassName\", \"icon\"]);\n\n var classes = mapToCssModules(classNames(className, 'toast-header'), cssModule);\n\n if (!close && toggle) {\n var closeIcon = typeof charCode === 'number' ? String.fromCharCode(charCode) : charCode;\n closeButton = /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n onClick: toggle,\n className: mapToCssModules('close', cssModule),\n \"aria-label\": closeAriaLabel\n }, /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\"\n }, closeIcon));\n }\n\n if (typeof iconProp === \"string\") {\n icon = /*#__PURE__*/React.createElement(\"svg\", {\n className: mapToCssModules(\"rounded text-\" + iconProp),\n width: \"20\",\n height: \"20\",\n xmlns: \"http://www.w3.org/2000/svg\",\n preserveAspectRatio: \"xMidYMid slice\",\n focusable: \"false\",\n role: \"img\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n fill: \"currentColor\",\n width: \"100%\",\n height: \"100%\"\n }));\n } else if (iconProp) {\n icon = iconProp;\n }\n\n return /*#__PURE__*/React.createElement(WrapTag, _extends({}, attributes, {\n className: classes\n }), icon, /*#__PURE__*/React.createElement(Tag, {\n className: mapToCssModules(classNames(tagClassName, {\n \"ml-2\": icon != null\n }), cssModule)\n }, children), close || closeButton);\n};\n\nToastHeader.propTypes = propTypes;\nToastHeader.defaultProps = defaultProps;\nexport default ToastHeader;"]},"metadata":{},"sourceType":"module"}