/*! For license information please see dll.ChatButton.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[31],{1051:function(t,e,n){"use strict";n.r(e);var a=n(5),o=n(11),s=n(13),i=n.n(s),r=n(0),l=n.n(r),c=n(18),p=l.a.forwardRef((function(t,e){var n=t.bsPrefix,s=t.variant,r=t.pill,p=t.className,u=t.as,h=void 0===u?"span":u,f=Object(o.default)(t,["bsPrefix","variant","pill","className","as"]),d=Object(c.useBootstrapPrefix)(n,"badge");return l.a.createElement(h,Object(a.default)({ref:e},f,{className:i()(p,d,r&&d+"-pill",s&&d+"-"+s)}))}));p.displayName="Badge",p.defaultProps={pill:!1},e.default=p},2210:function(t,e,n){"use strict";n.r(e);var a=n(967),o=n(2211);a.default.addResources("de","chat-button",o.DE),a.default.addResources("en","chat-button",o.EN),a.default.addResources("es","chat-button",o.ES)},2211:function(t){t.exports=JSON.parse('{"DE":{"join-chat":"Chat beitreten","join-chat-id":"Chat mit ID {{id}} beitreten","leave-chat":"Chat mit ID {{id}} verlassen","leave-chat-id":"Leave chat with ID {{id}}","toggle-chat":"Chat ein-/ausschalten"},"EN":{"join-chat":"Join Chat","join-chat-id":"Join chat with ID {{id}}","leave-chat-id":"Leave chat with ID {{id}}","leave-chat":"Leave Chat","toggle-chat":"Toggle Chat"},"ES":{}}')},825:function(t,e,n){"use strict";n.r(e);var a=n(14),o=n.n(a),s=n(12),i=n.n(s),r=n(10),l=n.n(r),c=n(15),p=n.n(c),u=n(16),h=n.n(u),f=n(8),d=n.n(f),m=n(7),b=n.n(m),v=n(0),g=n.n(v),S=n(1),C=n.n(S),y=n(37),E=n.n(y),w=n(3482),T=n(1051),j=n(74),_=n(43),k=n(141),A=n(35),D=n(105);n(2210);function R(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,a=d()(t);if(e){var o=d()(this).constructor;n=Reflect.construct(a,arguments,o)}else n=a.apply(this,arguments);return h()(this,n)}}var M=E()("isle:chat-button"),N=function(t){p()(n,t);var e=R(n);function n(t){var a;return o()(this,n),a=e.call(this,t),b()(l()(a),"hideAnimation",(function(){a.setState({showAnimation:!1})})),b()(l()(a),"handleClick",(function(t){M("Handle click to join chat...");var e=!a.state.opened;a.props.onClick(t,e),a.setState({opened:e},(function(){var t=a.context;e?(M("Should join chat for component with id '".concat(a.props.for,"'...")),t.joinChat({name:a.props.for,anonymousSubmissions:a.props.anonymousSubmissions})):(M("Should leave chat for component with id '".concat(a.props.for,"'...")),t.leaveChat(a.props.for))}))})),a.state={opened:!1,nMessages:0,nMembers:0},a}return i()(n,[{key:"componentDidMount",value:function(){var t=this,e=this.context;this.unsubscribe=e.subscribe((function(n,a){if(n!==D.SELF_HAS_JOINED_CHAT&&n!==D.RECEIVED_CHAT_HISTORY||!a||a.name!==t.props.for){if(n===D.CHAT_STATISTICS&&a.name===t.props.for){var o={nMessages:a.nMessages,nMembers:a.nMembers};a.nMessages>t.state.nMessages&&(o.showAnimation=!0),t.setState(o),setTimeout(t.hideAnimation,4e3)}else if(a===t.props.for){e.getChat(t.props.for)&&n!==D.SELF_HAS_LEFT_CHAT?n===D.REMOVED_CHAT&&t.setState({opened:!1}):t.setState({opened:!1}),t.forceUpdate()}}else t.setState({opened:!0})}))}},{key:"componentWillUnmount",value:function(){this.unsubscribe()}},{key:"render",value:function(){var t,e,n=this.state.nMessages;t=this.props.buttonLabel?this.props.buttonLabel:this.state.opened?this.props.t("leave-chat"):this.props.t("join-chat"),e=this.props.buttonVariant?this.props.buttonVariant:this.state.nMembers>0?"success":"secondary";var a,o=g.a.createElement(j.default,{className:this.props.className,variant:e,size:this.props.size,onClick:this.handleClick,style:this.props.style,"aria-label":this.props.t("toggle-chat")},g.a.createElement("span",{style:{pointerEvents:"none"}},t),n?g.a.createElement(T.default,{variant:"dark",style:{marginLeft:"5px",fontSize:"10px",pointerEvents:"none",animation:this.state.showAnimation?"ping 0.7s 3":"none"}},n):null);return a=this.props.tooltip?this.props.tooltip:this.state.opened?this.props.t("leave-chat-id",{id:this.props.for}):this.props.t("join-chat-id",{id:this.props.for}),this.props.showTooltip&&(o=g.a.createElement(_.default,{tooltip:a,placement:this.props.tooltipPlacement},o)),g.a.createElement(k.default,{user:!0},o)}}]),n}(v.Component);N.propTypes={for:C.a.string.isRequired,anonymousSubmissions:C.a.bool,buttonLabel:C.a.node,showTooltip:C.a.bool,tooltip:C.a.string,size:C.a.string,buttonVariant:C.a.string,tooltipPlacement:C.a.oneOf(["left","top","right","bottom"]),onClick:C.a.func,className:C.a.string,style:C.a.object},N.defaultProps={anonymousSubmissions:!1,buttonLabel:null,showTooltip:!0,tooltip:null,size:"sm",buttonVariant:null,tooltipPlacement:"top",onClick:function(){},className:"",style:{}},N.contextType=A.default,e.default=Object(w.withTranslation)("chat-button")(N)}}]);