/*! For license information please see dll.LikertScale.js.LICENSE.txt */
(window.webpackJsonp_name_hash_=window.webpackJsonp_name_hash_||[]).push([[71],{1026:function(e,t,n){"use strict";n.r(t);var a=n(13),s=n.n(a),i=n(12),r=n.n(i),l=n(7),o=n.n(l),u=n(14),c=n.n(u),p=n(15),d=n.n(p),f=n(8),m=n.n(f),h=n(5),b=n.n(h),v=n(0),y=n.n(v),g=n(1),S=n.n(g),R=n(25),E=n(35),w=n(26),N=n(65),_=n(119),k=n.n(_),C=n(27),I=n(19),M=n(34),L=n(18);function x(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 n,a=m()(e);if(t){var s=m()(this).constructor;n=Reflect.construct(a,arguments,s)}else n=a.apply(this,arguments);return d()(this,n)}}var A=Object(C.default)("likert-scale"),T=function(e){c()(n,e);var t=x(n);function n(e){var a;return s()(this,n),a=t.call(this,e),b()(o()(a),"submitHandler",(function(){var e=a.context;a.props.disableSubmitNotification||e.addNotification({title:"Answer submitted.",message:"Your answer was successfully stored",level:"success"}),a.setState({submitted:!0}),e.log({id:a.id,type:L.LIKERT_SCALE_SUBMISSION,value:k()(a.props.options,a.state.value)})})),b()(o()(a),"handleChange",(function(e){var t=e.target.value;a.setState({value:t})})),a.id=e.id||A(e),a.state={value:null,submitted:!1},a}return r()(n,[{key:"render",value:function(){var e=this,t=this.props.noMultipleResponses&&this.state.submitted;return y.a.createElement(R.default,{className:"center",style:{width:"75%"}},y.a.createElement(R.default.Body,null,y.a.createElement(N.default,{className:"center"},y.a.createElement("label",null,this.props.question),y.a.createElement("br",null),this.props.options.map((function(n,a){return y.a.createElement(E.default.Check,{type:"radio",label:n,checked:e.state.value===n,value:n,key:a,disabled:t,inline:!0,onClick:e.handleChange})}))),y.a.createElement("br",null),y.a.createElement(w.default,{className:"submit-button",variant:"primary",size:"sm",disabled:!this.state.value||t,onClick:this.submitHandler,style:{marginRight:"5px"}},this.state.submitted&&!this.props.noMultipleResponses?"Resubmit":"Submit"),y.a.createElement(M.default,{buttonLabel:"Responses",id:this.id,data:{type:"factor",levels:this.props.options},info:L.LIKERT_SCALE_SUBMISSION})))}}]),n}(v.Component);T.propTypes={question:S.a.string,options:S.a.array,noMultipleResponses:S.a.bool,disableSubmitNotification:S.a.bool},T.defaultProps={question:"",options:["Strongly disagree","Disagree","Neither agree nor disagree","Agree","Strongly agree"],noMultipleResponses:!1,disableSubmitNotification:!1},T.contextType=I.default,t.default=T}}]);