!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,r=window.wp.plugins,n=window.nisje.interface,a=window.nisje.router,o=window.nisje.icons;function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=window.React,u=window.wp.i18n,c=window.nisje.groups,p=function(e){var r,a,o=e.match,p=o.params.groupType,s=(r=(0,l.useState)(""),a=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],_n=!0,n=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(_n=(o=i.next()).done)&&(r.push(o.value),!t||r.length!==t);_n=!0);}catch(e){n=!0,a=e}finally{try{_n||null==i.return||i.return()}finally{if(n)throw a}}return r}}(r,a)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(r,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=s[0],g=s[1],b=parseInt(o.params.page||"1",10);return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n.Header,{title:(0,u.__)("Libraries"),onSearch:g,searchPlaceholder:(0,u.__)("Search groups")}),(0,t.createElement)(c.Groups,{page:b,search:m,groupType:p,paginationPath:"/libraries/",query:{group_type:"library"}}))};(0,r.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:p}),(0,t.createElement)(a.Route,{path:"/libraries/(:groupType)?/(page)?/:page?",component:p})),(0,t.createElement)(n.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)(o.Icon,{icon:o.arrowLeft})),"Bibliotekutvikling.no"))))}}),(window.nisje=window.nisje||{}).pluginBibliotekutvikling=e}();