"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[880],{20880:(e,t,a)=>{a.r(t),a.d(t,{default:()=>m});var c=a(51609),l=a(96979),n=a(45111),o=a(4219),d=a(27723);const m=e=>{const{saving:t,updateDocument:a}=(0,l.UseDocumentsData)(),{showSavedSettingsNotice:m}=(0,o.default)();let s=!!e.page.page_id;return(0,c.createElement)("div",{className:"cmplz-create-document"},s&&(0,c.createElement)(n.default,{name:"success",color:"green"}),!s&&(0,c.createElement)(n.default,{name:"times"}),(0,c.createElement)("input",{disabled:t,onChange:t=>((e,t)=>{a(t,e.target.value)})(t,e.page.page_id),type:"text",value:e.page.title}),(0,c.createElement)("div",{className:"cmplz-shortcode-container",onClick:t=>((e,t)=>{let a;e.target.classList.add("cmplz-click-animation");let c=document.createElement("input");document.getElementsByTagName("body")[0].appendChild(c),c.value=t,c.select();try{a=document.execCommand("copy")}catch(e){a=!1}c.parentElement.removeChild(c),a&&m((0,d.__)("Copied shortcode","complianz-gdpr"))})(t,e.page.shortcode)},(0,c.createElement)(n.default,{name:"shortcode"})))}}}]);