/*! For license information please see dll.QuestionForm.js.LICENSE.txt */
(window.webpackJsonp_name_dll=window.webpackJsonp_name_dll||[]).push([[107],{2962:function(e,t,n){"use strict";n.r(t);var r=n(967),s=n(2963);r.default.addResources("de","question-form",s.DE),r.default.addResources("en","question-form",s.EN),r.default.addResources("es","question-form",s.ES)},2963:function(e){e.exports=JSON.parse('{"DE":{"submit":"Abschicken","missing-children":"Für das Frageformular müssen mindestens zwei Kind-Elemente gerendert werden."},"EN":{"submit":"Submit","missing-children":"The question form requires at least two child elements to be rendered."},"ES":{}}')},2964:function(e,t,n){"use strict";n.r(t);var r=n(22),s=n.n(r),i=n(2965),o={insert:"head",singleton:!1};s()(i.default,o);t.default=i.default.locals||{}},2965:function(e,t,n){"use strict";n.r(t);var r=n(23),s=n.n(r)()(!1);s.push([e.i,".question-form .submit-button {\n\tdisplay: none;\n}\n\n.question-form {\n\tborder: 1px solid rgba(92, 92, 92, 0.6);\n\tpadding: 2px;\n}\n",""]),t.default=s},905:function(e,t,n){"use strict";n.r(t);var r=n(14),s=n.n(r),i=n(12),o=n.n(i),a=n(10),u=n.n(a),c=n(15),l=n.n(c),d=n(16),f=n.n(d),m=n(8),p=n.n(m),h=n(7),b=n.n(h),v=n(0),w=n.n(v),g=n(1),q=n.n(g),y=n(2297),E=n(977),S=n(75),k=n(983),R=n.n(k),C=n(36);n(2962),n(2964);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,r=p()(e);if(t){var s=p()(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return f()(this,n)}}var N=function(e){l()(n,e);var t=x(n);function n(e){var r;return s()(this,n),r=t.call(this,e),b()(u()(r),"handleClick",(function(){for(var e=r.questionForm.getElementsByClassName("submit-button"),t=0;t<e.length;t++)e[t].click();r.props.onSubmit()})),r.state={answered:{}},r}return o()(n,[{key:"render",value:function(){var e=this;if(!this.props.children)return w.a.createElement(E.default,{variant:"danger"},this.props.t("missing-children"));var t=w.a.Children.map(this.props.children,(function(t,n){return R()(t)?t:(t.props.requireAnswer||(e.state.answered[n]=!0),w.a.cloneElement(t,{disableSubmitNotification:!0,onChange:function(){var t=e.state.answered;t[n]=!0,e.setState(t)},key:n}))})),n=0;for(var r in this.state.answered)this.state.answered[r]&&(n+=1);var s=this.context,i=n!==t.length&&!s.isOwner();return w.a.createElement("div",{ref:function(t){e.questionForm=t},className:"question-form"},t,w.a.createElement(S.default,{disabled:i,onClick:this.handleClick},this.props.buttonLabel||this.props.t("submit")))}}]),n}(v.Component);N.propTypes={buttonLabel:q.a.string,onSubmit:q.a.func},N.defaultProps={buttonLabel:null,onSubmit:function(){}},N.contextType=C.default,t.default=Object(y.withTranslation)("question-form")(N)}}]);