(()=>{"use strict";const t=window.ReactJSXRuntime,{__}=wp.i18n,{registerBlockType:e}=wp.blocks,{RichText:a,MediaUpload:n,InspectorControls:l,InnerBlocks:i,URLInputButton:o}=wp.blockEditor,{Button:r,PanelBody:s,SelectControl:u}=wp.components;e("xgate/content-cta",{title:__("Content cta","xgate"),icon:"plugins-checked",category:"xgate-blocks",attributes:{title:{type:"string"},subtitle:{type:"string"},textContent:{type:"string"},variant:{type:"string",default:"primary"},design:{type:"string",default:"white-blue"},url:{type:"string",default:"/homepage"},text:{type:"string",default:"Contact us"},buttonText:{type:"string",default:"Click me"}},edit:function(e){const{attributes:n,setAttributes:l,className:i}=e,{title:r,subtitle:s,variant:c,textContent:g,buttonText:d,content:x}=n;return(0,t.jsxs)("div",{className:i,children:[(0,t.jsx)("h3",{children:"Content CTA"}),(0,t.jsx)(a,{tagName:"h2",placeholder:__("Add Title","xgate"),value:r,onChange:t=>{l({title:t})}}),(0,t.jsx)(a,{tagName:"h3",placeholder:__("Add Subtitle","xgate"),value:s,onChange:t=>{l({subtitle:t})}}),(0,t.jsx)(a,{tagName:"p",placeholder:__("Add text","xgate"),value:g,onChange:t=>{l({textContent:t})}}),(0,t.jsx)(u,{label:__("Button Variant","xgate"),value:c,options:[{label:__("Primary","xgate"),value:"primary"},{label:__("Secondary","xgate"),value:"secondary"}],onChange:t=>{l({variant:t})}}),(0,t.jsx)(a,{tagName:"p",placeholder:__("Add Button Text","xgate"),onChange:t=>{l({buttonText:t})}}),(0,t.jsx)(o,{variant:n.variant,url:n.url,onChange:(t,e)=>l({url:t,text:d||e.title,variant:n.variant})})]})},save:function(){return null}})})();