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