"use strict";(self.webpackChunkimonitornextgen=self.webpackChunkimonitornextgen||[]).push([[8945],{48945:(e,a,t)=>{t.r(a),t.d(a,{default:()=>x});var s=t(65043),l=t(97508),c=t(74725),n=t(79607),r=t(82113),o=t(19662),i=t(78232),d=t.n(i),m=t(18207),u=t(354),h=t(70579);const x=(0,l.Ng)((e=>{let{communityData:a}=e;return{communityData:a,UUID:a.communityId?a.communityId:null,languageId:1}}),null)((e=>{let{communityData:a,languageId:t,UUID:l}=e;const[i]=(0,c.B)(),[x,g]=(0,s.useState)(!1),[b,p]=(0,s.useState)(!1),[y,f]=(0,s.useState)(""),[j,N]=(0,s.useState)("");(0,s.useEffect)((()=>{r.A.post(n.getJiraFeeedbackForCommunity,{communityId:l}).then((e=>{let a=e.data?e.data.data:{};a&&(g(a.isJiraFeedback),f(a.apiKey),N(a.username))})).catch((e=>{console.log(e)}))}),[l]);return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(m.default,{isLoading:b}),(0,h.jsx)("div",{className:"row",children:(0,h.jsxs)("div",{className:"col-lg-6",children:[(0,h.jsx)("label",{className:"pr-2 d-block",for:"head",children:i("Enable JIRA Configuration")}),(0,h.jsx)(d(),{onChange:e=>g((e=>!e)),checked:x||!1,size:"xs"})]})}),(0,h.jsx)("div",{className:"row mt-2",children:(0,h.jsxs)("div",{className:"col-lg-6",children:[(0,h.jsx)("label",{className:"pr-2 d-block",for:"head",children:i("Reporter")}),(0,h.jsx)(u.A,{className:"form-control",type:"text",placeholder:i("Enter reporter here"),value:j,onChange:e=>N(e.target.value)})]})}),(0,h.jsx)("div",{className:"row mt-2",children:(0,h.jsxs)("div",{className:"col-lg-6",children:[(0,h.jsx)("label",{className:"pr-2 d-block",for:"head",children:i("APIKey")}),(0,h.jsx)(u.A,{className:"form-control",type:"text",placeholder:i("Enter APIKey here"),value:y,onChange:e=>f(e.target.value)})]})}),(0,h.jsx)("div",{className:"text-center card-footer mt-3",children:(0,h.jsxs)("button",{type:"submit",className:"mr-3 btn btn-primary btn-sm",onClick:e=>(e=>{e.preventDefault(),p(!0);let a={communityId:l,isJiraFeedback:x,apiKey:y,username:j};r.A.post(n.setJiraFeeedbackForCommunity,a).then((e=>{(0,o.Sv)("Flag set successfully",(()=>{window.location.reload()})),p(!1)})).catch((e=>{console.log(e)}))})(e),children:[(0,h.jsx)("i",{className:"fa fa-dot-circle-o"}),"  ",i("Submit")," "]})})]})}))}}]);
//# sourceMappingURL=8945.5399a1f7.chunk.js.map