/*! For license information please see dll.VideoChatButton.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[135],{3465:function(t,e,o){"use strict";o.r(e);var n=o(986),i=o(3466);n.default.addResources("de","video-chat-button",i.DE),n.default.addResources("en","video-chat-button",i.EN),n.default.addResources("es","video-chat-button",i.ES)},3466:function(t){t.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":{}}')},950:function(t,e,o){"use strict";o.r(e);var n=o(14),i=o.n(n),a=o(13),s=o.n(a),r=o(11),l=o.n(r),p=o(15),c=o.n(p),d=o(16),u=o.n(d),h=o(8),f=o.n(h),b=o(7),v=o.n(b),m=o(0),E=o.n(m),V=o(1),C=o.n(V),g=o(45),y=o.n(g),D=o(3611),j=o(104),w=o(42),R=o(151),T=o(34),S=o(108);o(3465);function I(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 o,n=f()(t);if(e){var i=f()(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return u()(this,o)}}var N=y()("isle:video-chat-button"),_=function(t){c()(o,t);var e=I(o);function o(t){var n;return i()(this,o),n=e.call(this,t),v()(l()(n),"toggleVideoChat",(function(t){var e=!n.state.opened;n.props.onClick(t,e),n.setState({opened:e},(function(){var t=n.context;e?(N("Should join chat for component with id '".concat(n.props.for,"'...")),t.joinVideoChat({name:n.props.for,subject:n.props.subject||n.props.for})):(N("Should leave chat for component with id '".concat(n.props.for,"'...")),t.leaveVideoChat(n.props.for))}))})),n.state={opened:!1},n}return s()(o,[{key:"componentDidMount",value:function(){var t=this,e=this.context;this.unsubscribe=e.subscribe((function(e,o){e===S.VIDEO_CHAT_STARTED&&o===t.props.for?t.setState({opened:!0}):e===S.VIDEO_CHAT_ENDED&&o===t.props.for?t.setState({opened:!1}):e!==S.RECEIVED_JITSI_TOKEN&&e!==S.RECEIVED_USER_RIGHTS||t.forceUpdate()}))}},{key:"componentWillUnmount",value:function(){this.unsubscribe()}},{key:"render",value:function(){var t,e,o,n=this.context,i=this.props.t;if(t=this.props.buttonLabel?this.props.buttonLabel:this.state.opened?i("leave"):i("join"),e=this.props.buttonVariant?this.props.buttonVariant:this.state.opened?"success":"secondary",!n.jitsi)return E.a.createElement(j.default,{disabled:!0,name:"Video Chat",variant:e,size:this.props.size,className:this.props.className,style:this.props.style,"aria-disabled":"true","aria-label":i("disabled")},t);o=this.props.tooltip?this.props.tooltip:this.state.opened?i("leave-id",{id:this.props.for}):i("join-id",{id:this.props.for});var a=E.a.createElement(j.default,{name:"Video Chat",variant:e,size:this.props.size,className:this.props.className,onClick:this.toggleVideoChat,style:this.props.style,"aria-label":i("toggle")},E.a.createElement("span",{style:{pointerEvents:"none"}},t));return this.props.showTooltip&&(a=E.a.createElement(w.default,{tooltip:o,placement:this.props.tooltipPlacement},a)),E.a.createElement(R.default,{user:!0},a)}}]),o}(m.Component);_.propTypes={for:C.a.string.isRequired,subject:C.a.string,buttonLabel:C.a.node,showTooltip:C.a.bool,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},_.defaultProps={subject:null,buttonLabel:null,showTooltip:!0,size:"sm",buttonVariant:null,tooltipPlacement:"top",onClick:function(){},className:"",style:{}},_.contextType=T.default,e.default=Object(D.withTranslation)("video-chat-button")(_)}}]);