/*! For license information please see dll.LikertScale.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[84],{889:function(e,t,n){"use strict";n.r(t);var a=n(7),l=n.n(a),s=n(202),r=n.n(s),o=n(0),i=n.n(o),c=n(1),u=n.n(c),p=n(88),b=n(59),d=n(77),f=n(79),m=n(114),y=n.n(m),O=n(63),g=n(37),S=n(149),j=n(200);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=Object(O.default)("likert-scale"),N=function(e){var t=e.id||v(e),n=Object(o.useContext)(g.default),a=Object(o.useState)(null),l=r()(a,2),s=l[0],c=l[1],u=Object(o.useState)(!1),m=r()(u,2),O=m[0],w=m[1],N=function(e){c(e.target.value)},h=e.noMultipleResponses&&O;return i.a.createElement(p.default,{className:"".concat(e.className," center"),style:E({width:"75%"},e.style)},i.a.createElement(p.default.Body,null,i.a.createElement(f.default,{className:"center"},i.a.createElement("label",null,e.question),i.a.createElement("br",null),e.options.map((function(e,t){return i.a.createElement(b.default.Check,{type:"radio",label:e,checked:s===e,value:e,key:t,disabled:h,inline:!0,onClick:N})}))),i.a.createElement("br",null),i.a.createElement(d.default,{className:"submit-button",variant:"primary",size:"sm",disabled:!s||h,onClick:function(){e.disableSubmitNotification||n.addNotification({title:"Answer submitted.",message:"Your answer was successfully stored",level:"success"}),w(!0),n.log({id:t,type:j.LIKERT_SCALE_SUBMISSION,value:y()(e.options,s)})},style:{marginRight:"5px"}},O&&!e.noMultipleResponses?"Resubmit":"Submit"),i.a.createElement(S.default,{buttonLabel:"Responses",id:t,data:{type:"factor",levels:e.options},info:j.LIKERT_SCALE_SUBMISSION})))};N.propTypes={question:u.a.oneOfType([u.a.string,u.a.node]),options:u.a.array,noMultipleResponses:u.a.bool,disableSubmitNotification:u.a.bool,className:u.a.string,style:u.a.object},N.defaultProps={question:"",options:["Strongly disagree","Disagree","Neither agree nor disagree","Agree","Strongly agree"],noMultipleResponses:!1,disableSubmitNotification:!1,className:"",style:{}},t.default=N}}]);