(()=>{"use strict";const e=window.wp.blockEditor,t=window.wp.blocks,o=window.wp.components,n=window.wp.i18n,i=window.ReactJSXRuntime,s={name:"cookiez/preferences-link",apiVersion:3,title:(0,n.__)("Cookiez preferences","cookiez"),icon:"admin-links",category:"widgets",attributes:{buttonText:{type:"string",default:(0,n.__)("Open Cookiez preferences","cookiez")}},edit:({attributes:t,setAttributes:s})=>{const r=(0,e.useBlockProps)();return(0,i.jsx)("div",{...r,children:(0,i.jsx)(o.TextControl,{label:(0,n.__)("Button text","cookiez"),value:t.buttonText,onChange:e=>s({buttonText:e})})})},save:({attributes:t})=>{const o=e.useBlockProps.save();return(0,i.jsx)("div",{...o,children:(0,i.jsx)("button",{className:"cookiez-preferences-trigger",children:t.buttonText})})}};(0,t.registerBlockType)("cookiez/preferences-link",s)})();