/*! For license information please see dll.HintButton.js.LICENSE.txt */
(window.webpackJsonp_name_hash_=window.webpackJsonp_name_hash_||[]).push([[44],{993:function(t,n,e){"use strict";e.r(n);var i=e(13),r=e.n(i),a=e(12),s=e.n(a),c=e(7),o=e.n(c),l=e(14),u=e.n(l),p=e(15),h=e.n(p),f=e(8),d=e.n(f),m=e(5),y=e.n(m),H=e(0),b=e.n(H),v=e(1),k=e.n(v),g=e(23),C=e.n(g),O=e(60),E=e(168),w=e(73);function R(t){var n=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 e,i=d()(t);if(n){var r=d()(this).constructor;e=Reflect.construct(i,arguments,r)}else e=i.apply(this,arguments);return h()(this,e)}}var _=C()("isle:hint-button"),x=function(t,n){return b.a.createElement(E.default,{id:"popover-positioned-top",title:"Hints",style:{minWidth:"400px",padding:"3px"}},n.filter((function(n,e){return e<=t})).map((function(t,n){return b.a.createElement("span",{key:n},b.a.createElement("label",{style:{marginBottom:0}},"Hint ",n+1,":"),b.a.createElement("br",null),b.a.createElement("span",null,t),b.a.createElement("br",null))})))},z=function(t){u()(e,t);var n=R(e);function e(t){var i;return r()(this,e),i=n.call(this,t),y()(o()(i),"handleHintClick",(function(t){_("Clicked on a hint button...");var n=i.state,e=n.currentHint,r=n.hintOpen,a=i.props.hints;if(!(e<a.length&&!1===r))return i.setState({hintOpen:!i.state.hintOpen}),t(i.state.hintOpen);i.props.onClick(e),i.setState({currentHint:e+1,hintOpen:!0},(function(){i.state.currentHint===a.length&&i.props.onFinished(),t(!1)}))})),i.state={hintOpen:!1,currentHint:0},i}return s()(e,[{key:"render",value:function(){var t,n,e=(t=this.state.currentHint,n=this.props.hints.length,this.state.hintOpen?t<=1?"Close Hint":"Close Hints":0===t?"Get Hint":t===n?"Show Hints":"Next Hint");return b.a.createElement(w.default,{trigger:"click",placement:this.props.placement,overlay:x(this.state.currentHint-1,this.props.hints)},b.a.createElement(O.default,{className:"hint-button",variant:"success",size:this.props.size,onClick:this.handleHintClick,disabled:this.props.disabled,autoActivate:!1,style:this.props.style},e))}}]),e}(H.Component);z.propTypes={disabled:k.a.bool,hints:k.a.arrayOf(k.a.oneOfType([k.a.string,k.a.element])).isRequired,onClick:k.a.func,onFinished:k.a.func,placement:k.a.string,size:k.a.string,style:k.a.object},z.defaultProps={disabled:!1,onClick:function(){},onFinished:function(){},placement:"left",size:"sm",style:{}},n.default=z}}]);