(window.webpackJsonpPlesk=window.webpackJsonpPlesk||[]).push([["app/server/key-upload"],{1086:function(e,t,c){"use strict";c.r(t);var n=c(629),l=c.n(n),a=c(155),r=c(276),o=c.n(r),i=c(633),s=c.n(i),m=c(156),d=c(353);function b(){const e=l()(["\n        {\n            config {\n                license {\n                    fileUpload\n                }\n            }\n        }\n    "]);return b=function(){return e},e}const u=e=>{var t,c;const[n,l]=Object(a.useState)(e.values),{data:{config:r}={}}=Object(d.useQuery)(Object(d.gql)(b())),o=({target:e})=>{l({...n,license_key:e.value})},i=({target:e})=>{l({...n,key_code:e.value})},{errors:u}=e;return Object(a.createElement)(a.Fragment,null,Object(a.createElement)("p",null,Object(a.createElement)(m.Translate,{content:null!=r&&null!==(t=r.license)&&void 0!==t&&t.fileUpload?"description":"descriptionCodeOnly"})),null!=r&&null!==(c=r.license)&&void 0!==c&&c.fileUpload?Object(a.createElement)("div",{className:"form-row"},Object(a.createElement)("div",{className:"field-name"},Object(a.createElement)("label",{htmlFor:"key-code"},Object(a.createElement)(m.Translate,{content:"licenseKey"}))),Object(a.createElement)("div",{className:"field-value"},Object(a.createElement)("div",{className:"text-value"},Object(a.createElement)("div",{className:"indent-box"},Object(a.createElement)("input",{type:"radio",value:"key-code",id:"key-code",className:"radiobox",name:"license_key",onChange:o,checked:"key-code"===n.license_key}),Object(a.createElement)("div",{className:"indent-box-content"},Object(a.createElement)("label",{htmlFor:"key-code"},Object(a.createElement)(m.Translate,{content:"codeText"})),Object(a.createElement)("div",{className:s()("form-row",u.key_code?"error":"")},Object(a.createElement)("input",{id:"key-code-input",type:"text",value:n.key_code,name:"key_code",onChange:i}),u.key_code?Object(a.createElement)("p",{className:"hint",dangerouslySetInnerHTML:{__html:u.key_code}}):null,Object(a.createElement)("p",{className:"text-muted"},Object(a.createElement)(m.Translate,{content:"codeHint"}))))),Object(a.createElement)("div",{className:"indent-box"},Object(a.createElement)("input",{type:"radio",value:"key-file",id:"key-file",className:"radiobox",name:"license_key",onChange:o,checked:"key-file"===n.license_key}),Object(a.createElement)("div",{className:"indent-box-content"},Object(a.createElement)("label",{htmlFor:"key-file"},Object(a.createElement)(m.Translate,{content:"fileText"})),Object(a.createElement)("div",{className:s()("form-row",u.key_file?"error":"")},Object(a.createElement)("input",{id:"key-file-input",name:"key_file",type:"file"}),u.key_file?Object(a.createElement)("p",{className:"hint"},u.key_file):null,Object(a.createElement)("p",{className:"text-muted"},Object(a.createElement)(m.Translate,{content:"fileHint"})))))))):Object(a.createElement)("div",{className:s()("form-row",u.key_code?"error":"")},Object(a.createElement)("div",{className:"field-name"},Object(a.createElement)("label",{htmlFor:"key-code"},Object(a.createElement)(m.Translate,{content:"codeText"}))),Object(a.createElement)("div",{className:"field-value"},Object(a.createElement)("input",{id:"key-code-input",type:"text",value:n.key_code,name:"key_code",onChange:i}),u.key_code?Object(a.createElement)("p",{className:"hint",dangerouslySetInnerHTML:{__html:u.key_code}}):null,Object(a.createElement)("p",{className:"text-muted"},Object(a.createElement)(m.Translate,{content:"codeHint"})))))};u.propTypes={values:o.a.object.isRequired,errors:o.a.object.isRequired},t.default=u}}]);
//# sourceMappingURL=key-upload.js.map?e2367a5e02a84035ba10