(()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.blocks,o=window.wp.i18n,n=window.wp.element,r=window.wp.data,i=window.wp.serverSideRender;var s=e.n(i);const c=window.wp.blockEditor,a=window.wp.components,l=window.wp.editor,d=JSON.parse('{"name":"woocommerce/email-content","title":"Email Content","description":"A placeholder block for email content.","category":"woocommerce","textdomain":"woocommerce","supports":{"inserter":false,"email":true},"attributes":{"emailType":{"type":"string"}},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),w=window.ReactJSXRuntime;function m(){return(0,w.jsx)("div",{style:{margin:"20vh auto",maxWidth:400,padding:20,backgroundColor:"#fff",borderRadius:4,boxShadow:"0 0 10px 0 rgba(0, 0, 0, 0.1)",textAlign:"center",color:"#000"},children:(0,w.jsxs)(a.__experimentalText,{children:[" ",(0,o.__)("Autogenerated content","woocommerce")," "]})})}(0,t.registerBlockType)(d.name,{...d,edit:function(){const[e,t]=(0,n.useState)(!1),o=(0,c.useBlockProps)(),{postSlug:i}=(0,r.useSelect)((e=>({postSlug:e(l.store).getCurrentPost?.()?.slug})),[]),a=(p=i||"",window.WooCommerceEmailEditor?.email_types?.find((e=>e.value===p))?.id||"WC_Email_Customer_Processing_Order");var p;return(0,w.jsxs)("div",{...o,onMouseEnter:()=>{t(!0)},onMouseLeave:()=>{t(!1)},style:{position:"relative"},children:[(0,w.jsx)(s(),{block:d.name,attributes:{emailType:a}}),e&&(0,w.jsx)("div",{style:{position:"absolute",zIndex:1e3,left:0,top:0,width:"100%",height:"100%",background:"rgba(0,0,0,0.5)",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"},children:(0,w.jsx)(m,{})})]})},save:function(){return(0,w.jsx)("div",{className:"wp-block-woocommerce-email-content",children:"##WOO_CONTENT##"})}}),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["email-content"]={}})();