!function(){"use strict";var e={};(function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);var t=window.wp.element,n=window.nisje.settings,r=window.nisje.interface,a=window.nisje.router,i=window.nisje.icons;function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var l=window.React,u=window.wp.i18n,c=window.nisje.groups,s=function(e){var n,a,i=e.match,s=i.params.groupType,p=(n=(0,l.useState)(""),a=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var r,a,i=[],_n=!0,o=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);_n=!0);}catch(e){o=!0,a=e}finally{try{_n||null==n.return||n.return()}finally{if(o)throw a}}return i}}(n,a)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(n,a)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),m=p[0],g=p[1],y=parseInt(i.params.page||"1",10);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(r.Header,{title:(0,u.__)("Libraries"),onSearch:g,searchPlaceholder:(0,u.__)("Search groups")}),(0,t.createElement)(c.Groups,{page:y,search:m,groupType:s,paginationPath:"/libraries/",query:{group_type:"library"}}))};(0,n.registerPlugin)("bibliotekutvikling",{render:function(){return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(a.PluginRoutes,null,(0,t.createElement)(a.Route,{path:"/libraries/type/:groupType/(page)?/:page?",component:s}),(0,t.createElement)(a.Route,{path:"/libraries/(:groupType)?/(page)?/:page?",component:s})),(0,t.createElement)(r.SidebarActionsControls,null,(0,t.createElement)("div",{className:"nb-back-to-main-wrapper"},(0,t.createElement)("a",{href:"/",className:"nb-back-to-main"},(0,t.createElement)("span",{className:"nb-back-to-main-icon"},(0,t.createElement)(i.Icon,{icon:i.arrowLeft})),"Bibliotekutvikling.no"))))}}),(window.nisje=window.nisje||{}).pluginBibliotekutvikling=e}();