(()=>{"use strict";const t=window.ReactJSXRuntime,{__}=wp.i18n,{registerBlockType:e}=wp.blocks,{RichText:a,MediaUpload:n,InspectorControls:l,InnerBlocks:i,URLInputButton:r}=wp.blockEditor,{Button:o,PanelBody:s,SelectControl:g}=wp.components;e("xgate/solo-cta",{title:__("Solo 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"},design:{type:"string",default:"transparent"}},edit:function(e){const{attributes:n,setAttributes:i,className:o}=e,{title:u,subtitle:c,variant:d,textContent:x,buttonText:p,design:h,content:b}=n;return(0,t.jsxs)("div",{className:o,children:[(0,t.jsx)("h1",{children:"Solo CTA"}),(0,t.jsx)(l,{children:(0,t.jsx)(s,{title:__("Block Settings","xgate"),children:(0,t.jsx)(g,{label:__("Design Variant","xgate"),value:h,options:[{label:__("Dark","xgate"),value:"dark"},{label:__("Transparent","xgate"),value:"transparent"}],onChange:t=>{i({design:t})}})})}),(0,t.jsx)(a,{tagName:"h1",placeholder:__("Add Title","xgate"),value:u,onChange:t=>{i({title:t})}}),(0,t.jsx)(a,{tagName:"h2",placeholder:__("Add Subtitle","xgate"),value:c,onChange:t=>{i({subtitle:t})}}),(0,t.jsx)(a,{tagName:"p",placeholder:__("Add text","xgate"),value:x,onChange:t=>{i({textContent:t})}}),(0,t.jsx)(g,{label:__("Button Variant","xgate"),value:d,options:[{label:__("Primary","xgate"),value:"primary"},{label:__("Secondary","xgate"),value:"secondary"}],onChange:t=>{i({variant:t})}}),(0,t.jsx)(a,{tagName:"p",placeholder:__("Add Button Text","xgate"),onChange:t=>{i({buttonText:t})}}),(0,t.jsx)(r,{variant:n.variant,url:n.url,onChange:(t,e)=>i({url:t,text:p||e.title,variant:n.variant})})]})},save:function(){return null}})})();