!function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.blocks,n=window.wp.element,o=window.wp.serverSideRender,r=e.n(o),a=window.wp.i18n,l=window.wp.blockEditor,s=window.wp.data,c=window.wp.components,i=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","name":"terms-block/terms-block","title":"Terms (Deprecated)","apiVersion":3,"icon":"tag","description":"Displays a list of all terms in the selected taxonomy. (Deprecated)","textdomain":"terms-block","attributes":{"className":{"type":"string","default":""},"taxonomy":{"type":"string","default":"category"}},"supports":{"inserter":false},"editorScript":"file:./index.js"}');const{name:m}=i;(0,t.registerBlockType)(m,{...i,edit:function({className:e,attributes:t,setAttributes:o}){const m=(0,l.useBlockProps)(),{taxonomy:u}=t,p=(0,s.useSelect)((e=>e("core").getTaxonomies({per_page:-1})||[]),[]),d=(0,s.useSelect)((e=>e("core").getEntityRecords("taxonomy",u,{})||[]),[u]),w=(0,n.createElement)(l.InspectorControls,null,(0,n.createElement)(c.PanelBody,{title:"Settings"},(0,n.createElement)(c.SelectControl,{label:"Taxonomy",onChange:e=>{o({taxonomy:e})},value:u,options:[...p.map((({name:e,slug:t})=>({value:t,label:e})))]})));return Array.isArray(d)&&d.length?(0,n.createElement)(n.Fragment,null,w,(0,n.createElement)("div",{...m},(0,n.createElement)(c.Disabled,null,(0,n.createElement)(r(),{className:e,block:i.name,attributes:t,emptyResponseLabel:(0,a.__)("Term Not Found.","terms-block")})))):(0,n.createElement)(n.Fragment,null,w,(0,n.createElement)(c.Placeholder,{icon:i.icon,label:(0,a.__)("Terms")},(0,a.__)("No terms found.")))},save:()=>null})}();