(()=>{"use strict";var e={790(e){e.exports=window.ReactJSXRuntime}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var c=t[r]={exports:{}};return e[r](c,c.exports,o),c.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=o(790);const{registerPlugin:n}=wp.plugins,{PluginSidebarMoreMenuItem:c}=wp.editor,{withSelect:s,select:i}=wp.data,{Button:a}=wp.components,{__}=wp.i18n;n("custom-export-button",{render:()=>(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(c,{target:"custom-export-button",icon:"admin-post",onClick:()=>{(()=>{const e=i("core/editor").getEditedPostContent(),t=i("core/editor").getEditedPostAttribute("title"),o=new Blob([JSON.stringify({__file:"wp_block",content:e,zoloVersion:zoloParams?.zolo_version||"1.0.0",title:t,syncStatus:"unsynced"},null,2)],{type:"application/json"}),r=URL.createObjectURL(o),n=document.createElement("a");n.href=r,n.download=`${""===t?"block":t.replace(/\s/g,"-").toLowerCase()}.json`,n.click(),URL.revokeObjectURL(r);const{createSuccessNotice:c}=wp.data.dispatch("core/notices");c(__("Great! The pattern is exported successfully.","zoloblocks"),{type:"default"})})()},children:__("Export as Pattern","zoloblocks")})})})})();