"use strict";(globalThis.webpackChunkcomplianz_gdpr=globalThis.webpackChunkcomplianz_gdpr||[]).push([[880],{20880:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});var c=a(96979),l=a(45111),n=a(4219),s=a(27723),d=a(10790);const o=e=>{const{saving:t,updateDocument:a}=(0,c.UseDocumentsData)(),{showSavedSettingsNotice:o}=(0,n.default)();let i=!!e.page.page_id;return(0,d.jsxs)("div",{className:"cmplz-create-document",children:[i&&(0,d.jsx)(l.default,{name:"success",color:"green"}),!i&&(0,d.jsx)(l.default,{name:"times"}),(0,d.jsx)("input",{disabled:t,onChange:t=>((e,t)=>{a(t,e.target.value)})(t,e.page.page_id),type:"text",value:e.page.title}),(0,d.jsx)("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&&o((0,s.__)("Copied shortcode","complianz-gdpr"))})(t,e.page.shortcode),children:(0,d.jsx)(l.default,{name:"shortcode"})})]})}}}]);