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