(()=>{"use strict";var e,s={669:()=>{const e=window.wp.blocks,s=window.wp.i18n,i=window.wp.blockEditor,t=window.wp.components,n=window.ReactJSXRuntime;(0,e.registerBlockType)("jvb/list",{edit:function({attributes:e,setAttributes:r}){const l=(0,i.useBlockProps)(),o=window.jvbListTypes?window.jvbListTypes.map((e=>({label:e.title,value:e.slug}))):[],a=window.jvbListTypes&&window.jvbListTypes.find((s=>s.slug===e.listType))||{};return(0,n.jsxs)("div",{...l,children:[(0,n.jsx)(i.InspectorControls,{children:(0,n.jsxs)(t.PanelBody,{title:(0,s.__)("List Settings","jvb"),children:[(0,n.jsx)(t.SelectControl,{label:(0,s.__)("List Type","jvb"),value:e.listType,options:o,onChange:e=>r({listType:e})}),(0,n.jsx)(t.ToggleControl,{label:(0,s.__)("Refresh Cache","jvb"),help:(0,s.__)("Enable to regenerate the list data on page load","jvb"),checked:e.refreshCache,onChange:e=>r({refreshCache:e})})]})}),(0,n.jsxs)("div",{className:"jvb-list-preview",children:[(0,n.jsx)("h3",{children:(0,s.__)("Directory List","jvb")}),(0,n.jsxs)("div",{className:"jvb-list-preview-info",children:[(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:(0,s.__)("Selected List Type:","jvb")})," ",a.title]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:(0,s.__)("Type:","jvb")})," ",a.type]}),a.links&&(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:(0,s.__)("Links:","jvb")})," ",a.links.join(", ")]}),(0,n.jsxs)("p",{children:[(0,n.jsx)("strong",{children:(0,s.__)("Cache Status:","jvb")}),e.refreshCache?(0,s.__)("Will refresh on load","jvb"):(0,s.__)("Using cached data","jvb")]})]}),(0,n.jsx)("p",{className:"jvb-list-preview-note",children:(0,s.__)("This alphabetical list will be rendered on the frontend.","jvb")})]})]})},save:function(){return null}})}},i={};function t(e){var n=i[e];if(void 0!==n)return n.exports;var r=i[e]={exports:{}};return s[e](r,r.exports,t),r.exports}t.m=s,e=[],t.O=(s,i,n,r)=>{if(!i){var l=1/0;for(d=0;d<e.length;d++){for(var[i,n,r]=e[d],o=!0,a=0;a<i.length;a++)(!1&r||l>=r)&&Object.keys(t.O).every((e=>t.O[e](i[a])))?i.splice(a--,1):(o=!1,r<l&&(l=r));if(o){e.splice(d--,1);var c=n();void 0!==c&&(s=c)}}return s}r=r||0;for(var d=e.length;d>0&&e[d-1][2]>r;d--)e[d]=e[d-1];e[d]=[i,n,r]},t.o=(e,s)=>Object.prototype.hasOwnProperty.call(e,s),(()=>{var e={450:0,382:0};t.O.j=s=>0===e[s];var s=(s,i)=>{var n,r,[l,o,a]=i,c=0;if(l.some((s=>0!==e[s]))){for(n in o)t.o(o,n)&&(t.m[n]=o[n]);if(a)var d=a(t)}for(s&&s(i);c<l.length;c++)r=l[c],t.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return t.O(d)},i=globalThis.webpackChunkjvb=globalThis.webpackChunkjvb||[];i.forEach(s.bind(null,0)),i.push=s.bind(null,i.push.bind(i))})();var n=t.O(void 0,[382],(()=>t(669)));n=t.O(n)})();
|