/*! For license information please see dll.LikertScale.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[71],{1091:function(e,t,n){"use strict";n.r(t);var a=n(13),s=n.n(a),i=n(12),l=n.n(i),r=n(6),o=n.n(r),u=n(14),c=n.n(u),p=n(15),d=n.n(p),f=n(8),m=n.n(f),b=n(5),h=n.n(b),v=n(0),y=n.n(v),g=n(1),S=n.n(g),R=n(22),E=n(37),w=n(24),N=n(66),k=n(124),C=n.n(k),_=n(27),I=n(20),M=n(36),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(_.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),h()(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:C()(a.props.options,a.state.value)})})),h()(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 l()(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}}]);