"use strict";(self.webpackChunkfunblocks=self.webpackChunkfunblocks||[]).push([[9393],{89393:(e,t,s)=>{s.r(t),s.d(t,{default:()=>u});var a=s(81925),l=s(36642),i=s(65834),n=s(96540),r=s(6442),o=s(61225),d=s(74848);const u=()=>{const e=(0,o.useDispatch)(),t=(0,r.A)(),[s,u]=(0,n.useState)(""),[c,h]=(0,n.useState)(""),[f,p]=(0,n.useState)([]),x=(0,o.useSelector)(e=>e.uiState.lng)||(0,l.J)(),g=(0,o.useSelector)(e=>e.operationStatus),[v,m]=(0,n.useState)(!1),[y,j]=(0,n.useState)(),[b,_]=(0,n.useState)({reason:!0,detail:!0});return(0,n.useEffect)(()=>{e((0,a.maQ)({locale:x},e=>{p(e)}))},[]),(0,n.useEffect)(()=>{g?.inProgress||m(null)},[g]),(0,d.jsxs)("div",{className:"full-height",style:{display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center"},children:[!y&&(0,d.jsxs)("div",{style:{maxWidth:800},children:[(0,d.jsxs)("h2",{children:[t.formatMessage({id:"sorry_for_uninstall"})," :("]}),(0,d.jsxs)("p",{children:[t.formatMessage({id:"please_tell_your_uninstall_reason"}),":"]}),f.map(e=>(0,d.jsxs)("div",{style:{cursor:"pointer",padding:6,paddingLeft:0},children:[(0,d.jsx)("input",{type:"radio",name:"reason",value:e.value,id:e.value,checked:s===e.value,onChange:e=>{u(e.target.value),_({...b,reason:!!e.target.value})},style:{cursor:"pointer"}}),(0,d.jsx)("label",{htmlFor:e.value,style:{cursor:"pointer",paddingLeft:6},children:e.label})]},e.value)),!b?.reason&&(0,d.jsx)("div",{style:{color:"red",fontSize:14},children:t.formatMessage({id:"please_give_reason"})}),(0,d.jsx)("textarea",{style:{marginTop:10,border:"1px solid gray",borderRadius:5,outline:"none",width:"-webkit-fill-available",fontFamily:"inherit",lineHeight:1.2,padding:4},placeholder:f?.find(e=>e.value==s)?.hint,rows:5,value:c,onChange:e=>{h(e.target.value),_({...b,detail:!!e.target.value})}}),!b?.detail&&(0,d.jsx)("div",{style:{color:"red",fontSize:14},children:t.formatMessage({id:"please_give_detail"})}),(0,d.jsx)("div",{style:{marginTop:10,width:"100%",display:"flex",flexDirection:"row",justifyContent:"flex-end"},children:(0,d.jsx)(i.A,{variant:"contained",onClick:t=>{if(t.preventDefault(),!s||!c)return _({reason:!!s,detail:!!c});m(!0),e((0,a.id1)({reason:s,detail:c},()=>{j(!0)}))},disabled:v,children:t.formatMessage({id:"submit"})})})]}),y&&(0,d.jsxs)("div",{style:{display:"flex",flexDirection:"column",maxWidth:800},children:[(0,d.jsx)("p",{children:t.formatMessage({id:"thanks_for_feedback"})}),(0,d.jsx)("p",{children:t.formatMessage({id:"intro_funblocks"})}),(0,d.jsx)("div",{children:(0,d.jsx)("a",{href:`https://${window.location.host}`,children:`https://${window.location.host}`})})]})]})}}}]);
//# sourceMappingURL=index.js.map