import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["view","status","size","icon","label","title","children","style"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import"./Informer.css";import{classnames}from"@bem-react/classnames";import React from"react";import{cnMixSpace}from"../../mixs/MixSpace";import{cn}from"../../utils/bem";import{Text}from"../Text/Text";import{useTheme}from"../Theme/Theme";export var informerPropView=["filled","bordered"];export var informerPropViewDefault=informerPropView[0];export var informerPropStatus=["success","system","alert","warning"];export var informerPropStatusDefault=informerPropStatus[0];export var informerPropSize=["m","s"];export var informerPropSiseDefault=informerPropSize[0];export var cnInformer=cn("Informer");export var Informer=React.forwardRef(function(a,b){var c=a.view,d=void 0===c?informerPropViewDefault:c,e=a.status,f=void 0===e?informerPropStatusDefault:e,g=a.size,h=void 0===g?informerPropSiseDefault:g,i=a.icon,j=a.label,k=a.title,l=a.children,m=a.style,n=_objectWithoutProperties(a,_excluded),o=i,p=useTheme(),q=p.themeClassNames,r="system"!==f&&"filled"===d?classnames(a.className,q.color.accent):a.className;return React.createElement("div",Object.assign({},n,{className:cnInformer({view:d,withIcon:!!i},[r,cnMixSpace({p:h})]),style:_objectSpread(_objectSpread({},m),{},_defineProperty({},"--informer-status-color",f?"var(--color-bg-".concat(f,")"):void 0)),ref:b}),o&&React.createElement(o,{className:cnInformer("Icon"),size:"s"}),React.createElement("div",{className:cnInformer("Content")},k&&React.createElement(Text,{lineHeight:"xs",className:cnInformer("Title",[cnMixSpace({mB:"2xs"})]),weight:"bold",size:h,view:"primary"},k),j?React.createElement(Text,{lineHeight:"xs",view:"primary",className:cnInformer("Label"),size:h},j):l))});
//# sourceMappingURL=Informer.js.map