(()=>{"use strict";const t=window.wp.blocks,n=JSON.parse('{"UU":"remote-data-blocks/remote-html"}'),e=window.ReactJSXRuntime,o=window.wp.blockEditor,i=window.wp.components,l=window.wp.data,s=window.wp.i18n;function __(t){return(0,s.__)(t,"remote-data-blocks")}const r=()=>(0,e.jsx)(i.Placeholder,{label:__("Remote HTML"),instructions:__("This block only works when placed inside a remote data block container and bound to an attribute. This block will be ignored as currently configured.")}),a=window.wp.element;(0,t.registerBlockType)(n.UU,{edit:function(t){var n,s,a;const{attributes:d,isSelected:c}=t,u=(0,o.useBlockProps)(),{content:w}=d,m=(0,l.useSelect)((t=>t(o.store).getSettings().styles),[]),v=["\n\thtml,body,:root {\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\toverflow: visible !important;\n\t\tmin-height: auto !important;\n\t}\n",...(0,o.transformStyles)((null!=m?m:[]).filter((t=>t.css)))],b=void 0!==(null===(s=null===(n=null==d?void 0:d.metadata)||void 0===n?void 0:n.bindings)||void 0===s?void 0:s.content),p=null!==(a=null==w?void 0:w.toString())&&void 0!==a?a:"",g=p.length>0;return b||g?(0,e.jsxs)("div",Object.assign({},u,{children:[(0,e.jsx)(i.SandBox,{html:p,styles:v,title:__("Remote Data Block HTML Preview"),tabIndex:-1}),!c&&(0,e.jsx)("div",{className:"remote-data-block-html-overlay"})]})):(0,e.jsx)("div",Object.assign({},u,{children:(0,e.jsx)(r,{})}))},save:function(t){var n,o;return(0,e.jsx)(a.RawHTML,{children:null!==(o=null===(n=t.attributes.content)||void 0===n?void 0:n.toString())&&void 0!==o?o:""})}})})();