"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[5552,2010,5553,3990],{52010:(e,t,a)=>{a.r(t),a.d(t,{default:()=>c});var n=a(86087),l=a(45111);const c=e=>{const[t,a]=(0,n.useState)(!1);return(0,n.createElement)("div",{className:"cmplz-panel__list__item",style:e.style?e.style:{}},(0,n.createElement)("details",{open:t},(0,n.createElement)("summary",{onClick:e=>(e=>{e.preventDefault(),a(!t)})(e)},e.icon&&(0,n.createElement)(l.default,{name:e.icon}),(0,n.createElement)("h5",{className:"cmplz-panel__list__item__title"},e.summary),(0,n.createElement)("div",{className:"cmplz-panel__list__item__comment"},e.comment),(0,n.createElement)("div",{className:"cmplz-panel__list__item__icons"},e.icons),(0,n.createElement)(l.default,{name:"chevron-down",size:18})),(0,n.createElement)("div",{className:"cmplz-panel__list__item__details"},t&&e.details)))}},95552:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});var n=a(86087),l=a(4219),c=a(75553),m=a(3990),i=a(27723),r=a(99695);const o=(0,n.memo)((()=>{const[e,t]=(0,n.useState)(!0),{getFieldValue:a,fields:o}=(0,l.default)(),{privacyStatementsLoaded:s,fetchPrivacyStatementsData:p,privacyStatements:u}=(0,c.default)();return(0,n.useEffect)((()=>{let e="generated"===a("privacy-statement");t(e),!s&&e&&p()}),[o]),!s&&e?(0,n.createElement)(n.Fragment,null,(0,n.createElement)(r.default,{lines:"3"})):(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",null,e&&0===u.length&&(0,n.createElement)(n.Fragment,null,(0,i.__)("No plugins with suggested statements found.","complianz-gdpr")),!e&&(0,n.createElement)(n.Fragment,null,(0,i.__)("You have chosen to generate your own Privacy Statement, which means the option to add custom text to it is not applicable.","complianz-gdpr")),e&&(0,n.createElement)("div",{className:"cmplz-panel__list"},Array.isArray(u)&&u.map(((e,t)=>(0,n.createElement)(m.default,{key:t,plugin:e,icon:"plugin"}))))))}))},75553:(e,t,a)=>{a.r(t),a.d(t,{default:()=>c});var n=a(81621),l=a(9588);const c=(0,n.vt)(((e,t)=>({privacyStatementsLoaded:!1,privacyStatements:[],fetchPrivacyStatementsData:async()=>{const{privacyStatements:t}=await l.doAction("wp_privacy_policy_data").then((e=>e)).catch((e=>{console.error(e)}));e({privacyStatementsLoaded:!0,privacyStatements:t})}})))},3990:(e,t,a)=>{a.r(t),a.d(t,{default:()=>s});var n=a(86087),l=a(52010),c=a(27723),m=a(45111),i=a(4219),r=a(42838),o=a.n(r);const s=(0,n.memo)((e=>{const{updateField:t,setChangedField:a,getFieldValue:r}=(0,i.default)();return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(l.default,{summary:e.plugin.plugin_name,icon:e.icon,icons:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("button",{className:"cmplz-button-icon",onClick:n=>((e,n,l)=>{l.preventDefault();let c=r("custom_privacy_policy_text");c+="<h1>"+e+"</h1>"+n,t("custom_privacy_policy_text",c),a("custom_privacy_policy_text",c)})(e.plugin.plugin_name,e.plugin.policy_text,n)},(0,n.createElement)(m.default,{tooltip:(0,c.__)("Add to annex of Privacy Statement","complianz-gdpr"),name:"plus"})),"na"!==e.plugin.consent_api&&(0,n.createElement)(n.Fragment,null,(0,n.createElement)("button",{className:"cmplz-button-icon"},!e.plugin.consent_api&&(0,n.createElement)(m.default,{tooltip:(0,c.__)("Does not conform with the Consent API","complianz-gdpr"),name:"circle",color:"red"}),e.plugin.consent_api&&(0,n.createElement)(m.default,{tooltip:(0,c.__)("Conforms to the Consent API","complianz-gdpr"),name:"circle",color:"green"})))),details:(0,n.createElement)(n.Fragment,null,(0,n.createElement)("div",{className:"cmplz-details-row",dangerouslySetInnerHTML:{__html:o().sanitize(e.plugin.policy_text)}}))}))}))}}]);