/*! For license information please see dll.VideoChatButton.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[146],{3255:function(e,t,o){"use strict";o.r(t);var i=o(965),n=o(3256);i.default.addResources("de","video-chat-button",n.DE),i.default.addResources("en","video-chat-button",n.EN),i.default.addResources("es","video-chat-button",n.ES)},3256:function(e){e.exports=JSON.parse('{"DE":{"disabled":"Inaktiver Video Chat","join":"Video beitreten","join-id":"Nimm an Video-Chat mit ID {{id}} teil","leave":"Video verlassen","leave-id":"Verlasse Video-Chat mit ID {{id}}","toggle":"Video Chat betreten/verlassen"},"EN":{"disabled":"Disabled Video Chat","join":"Join Video","join-id":"Join video chat with ID {{id}}","leave":"Leave Video","leave-id":"Leave video chat with ID {{id}}","toggle":"Toggle Video Chat"},"ES":{"disabled":"Video chat para discapacitados","join":"Únete el video","join-id":"Únete al video chat con ID {{id}}","leave":"Dejar el video","leave-id":"Deje el video chat con ID {{id}}","toggle":"Toggle video chat"}}')},944:function(e,t,o){"use strict";o.r(t);var i=o(14),n=o.n(i),a=o(13),s=o.n(a),r=o(10),l=o.n(r),c=o(15),d=o.n(c),p=o(16),u=o.n(p),h=o(8),f=o.n(h),v=o(7),b=o.n(v),m=o(0),V=o.n(m),E=o(1),g=o.n(E),C=o(36),D=o.n(C),j=o(2309),y=o(77),T=o(44),w=o(146),I=o(37),R=o(109);o(3255);function S(e){var t=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(e){return!1}}();return function(){var o,i=f()(e);if(t){var n=f()(this).constructor;o=Reflect.construct(i,arguments,n)}else o=i.apply(this,arguments);return u()(this,o)}}var N=D()("isle:video-chat-button"),_=function(e){d()(o,e);var t=S(o);function o(e){var i;return n()(this,o),i=t.call(this,e),b()(l()(i),"toggleVideoChat",(function(e){var t=!i.state.opened;i.props.onClick(e,t),i.setState({opened:t},(function(){var e=i.context;t?(N("Should join chat for component with id '".concat(i.props.for,"'...")),e.joinVideoChat({name:i.props.for,subject:i.props.subject||i.props.for})):(N("Should leave chat for component with id '".concat(i.props.for,"'...")),e.leaveVideoChat(i.props.for))}))})),i.state={opened:!1},i}return s()(o,[{key:"componentDidMount",value:function(){var e=this,t=this.context;this.unsubscribe=t.subscribe((function(t,o){t===R.VIDEO_CHAT_STARTED&&o===e.props.for?e.setState({opened:!0}):t===R.VIDEO_CHAT_ENDED&&o===e.props.for?e.setState({opened:!1}):t!==R.RECEIVED_JITSI_TOKEN&&t!==R.RECEIVED_USER_RIGHTS||e.forceUpdate()}))}},{key:"componentWillUnmount",value:function(){this.unsubscribe()}},{key:"render",value:function(){var e,t,o,i=this.context,n=this.props.t;if(e=this.props.buttonLabel?this.props.buttonLabel:this.state.opened?n("leave"):n("join"),t=this.props.buttonVariant?this.props.buttonVariant:this.state.opened?"success":"secondary",!i.jitsi)return V.a.createElement(y.default,{disabled:!0,name:"Video Chat",variant:t,size:this.props.size,className:this.props.className,style:this.props.style,"aria-disabled":"true","aria-label":n("disabled")},e);o=this.props.tooltip?this.props.tooltip:this.state.opened?n("leave-id",{id:this.props.for}):n("join-id",{id:this.props.for});var a=V.a.createElement(y.default,{name:"Video Chat",variant:t,size:this.props.size,className:this.props.className,onClick:this.toggleVideoChat,style:this.props.style,"aria-label":n("toggle")},V.a.createElement("span",{style:{pointerEvents:"none"}},e));return this.props.showTooltip&&(a=V.a.createElement(T.default,{tooltip:o,placement:this.props.tooltipPlacement},a)),V.a.createElement(w.default,{user:!0},a)}}]),o}(m.Component);_.propTypes={for:g.a.string.isRequired,subject:g.a.string,buttonLabel:g.a.node,showTooltip:g.a.bool,size:g.a.string,buttonVariant:g.a.string,tooltipPlacement:g.a.oneOf(["left","top","right","bottom"]),onClick:g.a.func,className:g.a.string,style:g.a.object},_.defaultProps={subject:null,buttonLabel:null,showTooltip:!0,size:"sm",buttonVariant:null,tooltipPlacement:"top",onClick:function(){},className:"",style:{}},_.contextType=I.default,t.default=Object(j.withTranslation)("video-chat-button")(_)}}]);