"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[2827],{82827:(e,t,a)=>{a.r(t),a.d(t,{default:()=>i});var n=a(51609),r=a(56427),l=a(27723),s=a(9588),c=a(86087),o=a(45111),u=a(42838),m=a.n(u);const i=(0,c.memo)((()=>{const[e,t]=(0,c.useState)(""),[a,u]=(0,c.useState)(!1),[i,d]=(0,c.useState)(!1),[p,g]=(0,c.useState)("");let h=a||0===e.length;return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.TextareaControl,{disabled:a,placeholder:(0,l.__)("Type your question here","complianz-gdpr"),onChange:e=>(e=>{t(e)})(e)}),p&&(0,n.createElement)("div",{className:"cmplz-support-alert cmplz-"+(i?"success":"warning")},(0,n.createElement)(o.default,{name:i?"circle-check":"error",color:i?"green":"red",size:16}),(0,n.createElement)("div",{dangerouslySetInnerHTML:{__html:m().sanitize(p)}})," "),(0,n.createElement)("div",null,(0,n.createElement)("button",{className:"button button-primary",disabled:h,variant:"secondary",onClick:t=>(()=>{u(!0);let t={message:e};return s.doAction("supportData",t).then((e=>{d(e.success),g(e.message)}))})()},(0,l.__)("Send","complianz-gdpr"))))}))}}]);