(self.webpackChunkPlesk=self.webpackChunkPlesk||[]).push([["app/server/key-upload"],{1193:(e,n,t)=>{"use strict";t.r(n);var a=t(153),l=t(260),i=t.n(l),c=t(578),r=t.n(c),o=t(154),s=t(404),d=t(1194),m=t.n(d);const u=e=>{var n,t;const[l,i]=(0,a.useState)(e.values),{data:{config:c}={}}=(0,s.useQuery)(m()),d=({target:e})=>{i({...l,license_key:e.value})},u=({target:e})=>{i({...l,key_code:e.value})},{errors:f}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("p",null,(0,a.createElement)(o.Translate,{content:null!=c&&null!==(n=c.license)&&void 0!==n&&n.fileUpload?"description":"descriptionCodeOnly"})),null!=c&&null!==(t=c.license)&&void 0!==t&&t.fileUpload?(0,a.createElement)("div",{className:"form-row"},(0,a.createElement)("div",{className:"field-name"},(0,a.createElement)("label",{htmlFor:"key-code"},(0,a.createElement)(o.Translate,{content:"licenseKey"}))),(0,a.createElement)("div",{className:"field-value"},(0,a.createElement)("div",{className:"text-value"},(0,a.createElement)("div",{className:"indent-box"},(0,a.createElement)("input",{type:"radio",value:"key-code",id:"key-code",className:"radiobox",name:"license_key",onChange:d,checked:"key-code"===l.license_key}),(0,a.createElement)("div",{className:"indent-box-content"},(0,a.createElement)("label",{htmlFor:"key-code"},(0,a.createElement)(o.Translate,{content:"codeText"})),(0,a.createElement)("div",{className:r()("form-row",f.key_code?"error":"")},(0,a.createElement)("input",{id:"key-code-input",type:"text",value:l.key_code,name:"key_code",onChange:u}),f.key_code?(0,a.createElement)("p",{className:"hint",dangerouslySetInnerHTML:{__html:f.key_code}}):null,(0,a.createElement)("p",{className:"text-muted"},(0,a.createElement)(o.Translate,{content:"codeHint"}))))),(0,a.createElement)("div",{className:"indent-box"},(0,a.createElement)("input",{type:"radio",value:"key-file",id:"key-file",className:"radiobox",name:"license_key",onChange:d,checked:"key-file"===l.license_key}),(0,a.createElement)("div",{className:"indent-box-content"},(0,a.createElement)("label",{htmlFor:"key-file"},(0,a.createElement)(o.Translate,{content:"fileText"})),(0,a.createElement)("div",{className:r()("form-row",f.key_file?"error":"")},(0,a.createElement)("input",{id:"key-file-input",name:"key_file",type:"file"}),f.key_file?(0,a.createElement)("p",{className:"hint"},f.key_file):null,(0,a.createElement)("p",{className:"text-muted"},(0,a.createElement)(o.Translate,{content:"fileHint"})))))))):(0,a.createElement)("div",{className:r()("form-row",f.key_code?"error":"")},(0,a.createElement)("div",{className:"field-name"},(0,a.createElement)("label",{htmlFor:"key-code"},(0,a.createElement)(o.Translate,{content:"codeText"}))),(0,a.createElement)("div",{className:"field-value"},(0,a.createElement)("input",{id:"key-code-input",type:"text",value:l.key_code,name:"key_code",onChange:u}),f.key_code?(0,a.createElement)("p",{className:"hint",dangerouslySetInnerHTML:{__html:f.key_code}}):null,(0,a.createElement)("p",{className:"text-muted"},(0,a.createElement)(o.Translate,{content:"codeHint"})))))};u.propTypes={values:i().object.isRequired,errors:i().object.isRequired},n.default=u},1194:e=>{var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ServerKeyUploadPage"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"config"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"license"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"fileUpload"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:107}};n.loc.source={body:"query ServerKeyUploadPage {\r\n    config {\r\n        license {\r\n            fileUpload\r\n        }\r\n    }\r\n}\r\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function t(e,n){if("FragmentSpread"===e.kind)n.add(e.name.value);else if("VariableDefinition"===e.kind){var a=e.type;"NamedType"===a.kind&&n.add(a.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){t(e,n)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){t(e,n)})),e.definitions&&e.definitions.forEach((function(e){t(e,n)}))}var a={};function l(e,n){for(var t=0;t<e.definitions.length;t++){var a=e.definitions[t];if(a.name&&a.name.value==n)return a}}n.definitions.forEach((function(e){if(e.name){var n=new Set;t(e,n),a[e.name.value]=n}})),e.exports=n,e.exports.ServerKeyUploadPage=function(e,n){var t={kind:e.kind,definitions:[l(e,n)]};e.hasOwnProperty("loc")&&(t.loc=e.loc);var i=a[n]||new Set,c=new Set,r=new Set;for(i.forEach((function(e){r.add(e)}));r.size>0;){var o=r;r=new Set,o.forEach((function(e){c.has(e)||(c.add(e),(a[e]||new Set).forEach((function(e){r.add(e)})))}))}return c.forEach((function(n){var a=l(e,n);a&&t.definitions.push(a)})),t}(n,"ServerKeyUploadPage")}}]);
//# sourceMappingURL=key-upload.js.map?d91b15a1a5e99ea907a6