(()=>{"use strict";var e,t={420(){const e=window.wp.blocks,t=window.wp.blockEditor,a=window.wp.components,r=window.wp.i18n,o=JSON.parse('{"UU":"gateway/router"}'),s=window.ReactJSXRuntime;(0,e.registerBlockType)(o.UU,{edit:({attributes:e,setAttributes:o})=>{const{namespace:n,defaultRoute:l}=e,i=(0,t.useBlockProps)({className:"gateway-router"});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.InspectorControls,{children:(0,s.jsxs)(a.PanelBody,{title:(0,r.__)("Router Settings","gateway"),children:[(0,s.jsx)(a.TextControl,{label:(0,r.__)("Namespace","gateway"),help:(0,r.__)("The interactivity namespace for this router instance.","gateway"),value:n,onChange:e=>o({namespace:e}),placeholder:"gateway/router"}),(0,s.jsx)(a.TextControl,{label:(0,r.__)("Default Route","gateway"),help:(0,r.__)("The route path to display by default.","gateway"),value:l,onChange:e=>o({defaultRoute:e}),placeholder:"/"})]})}),(0,s.jsxs)("div",{...i,children:[(0,s.jsxs)("div",{className:"gateway-router__label",children:[(0,s.jsx)("span",{className:"gateway-router__icon",children:"⇌"}),(0,r.__)("Router","gateway"),"gateway/router"!==n&&(0,s.jsx)("span",{className:"gateway-router__namespace",children:n})]}),(0,s.jsx)("div",{className:"gateway-router__content",children:(0,s.jsx)(t.InnerBlocks,{template:[["gateway/route",{}]],templateLock:!1,allowedBlocks:["gateway/route"]})})]})]})},save:({attributes:e})=>{const{namespace:a,defaultRoute:r}=e,o=JSON.stringify({route:r||"/",defaultRoute:r||"/"});return(0,s.jsx)("div",{...t.useBlockProps.save({className:"gateway-router"}),"data-wp-interactive":a||"gateway/router","data-wp-context":o,"data-wp-init":"callbacks.init",children:(0,s.jsx)(t.InnerBlocks.Content,{})})}})}},a={};function r(e){var o=a[e];if(void 0!==o)return o.exports;var s=a[e]={exports:{}};return t[e](s,s.exports,r),s.exports}r.m=t,e=[],r.O=(t,a,o,s)=>{if(!a){var n=1/0;for(u=0;u<e.length;u++){for(var[a,o,s]=e[u],l=!0,i=0;i<a.length;i++)(!1&s||n>=s)&&Object.keys(r.O).every(e=>r.O[e](a[i]))?a.splice(i--,1):(l=!1,s<n&&(n=s));if(l){e.splice(u--,1);var c=o();void 0!==c&&(t=c)}}return t}s=s||0;for(var u=e.length;u>0&&e[u-1][2]>s;u--)e[u]=e[u-1];e[u]=[a,o,s]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={714:0,462:0};r.O.j=t=>0===e[t];var t=(t,a)=>{var o,s,[n,l,i]=a,c=0;if(n.some(t=>0!==e[t])){for(o in l)r.o(l,o)&&(r.m[o]=l[o]);if(i)var u=i(r)}for(t&&t(a);c<n.length;c++)s=n[c],r.o(e,s)&&e[s]&&e[s][0](),e[s]=0;return r.O(u)},a=globalThis.webpackChunkgateway_block_types=globalThis.webpackChunkgateway_block_types||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})();var o=r.O(void 0,[462],()=>r(420));o=r.O(o)})();