!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.lodash,r=window.wp.hooks,i=window.nisje.app.plugins,a=window.nisje.app.routes,o=window.nisje.app.router,s=window.nisje.app.constants,d=window.nisje.components,l=window.nisje.views,c=window.nisje.data,u=window.nisje.icons,p=function(e){let{type:n,id:r}=e;const[i,a]=(0,c.useApiFetch)(`/wp/v2/${n}/${r}?_fields=content`);if(!i)return(0,t.createElement)("div",{style:{textAlign:"center",padding:30}},(0,t.createElement)(d.Loader,{size:30}));if(a)return(0,t.createElement)(l.Message,{icon:u.warning},a.data.status,": ",a.message);const{content:o}=i;return(0,t.createElement)(d.EntryContainer,{autoHeight:!0,transparent:!0},(0,t.createElement)(d.EntryContent,null,o.rendered))},w=window.wp.i18n,g=window.nisje.interface,f=function(e){let{match:n}=e;const{id:r}=n.params,[i,a]=(0,c.useApiFetch)(`/wp/v2/nisje-feed-frontpage/${r}/revisions?_fields=content`);if(!i)return(0,t.createElement)("div",{style:{textAlign:"center",padding:30}},(0,t.createElement)(d.Loader,{size:30}));if(a)return(0,t.createElement)(l.Message,{icon:u.warning},a.data.status,": ",a.message);const{content:o}=i[0];return(0,t.createElement)(t.Fragment,null,(0,t.createElement)(g.Header,{title:(0,w.__)("Wall","nisje")}),(0,t.createElement)(d.EntryContainer,{autoHeight:!0,transparent:!0},(0,t.createElement)(d.EntryContent,null,o.rendered)))};(0,r.addFilter)("nisje.frontpage","nisje/feedLayouts/frontpage",(e=>r=>{const i=(0,s.getConstant)("feedLayouts.frontpage",0);return 0!==i&&(0,n.isEmpty)(r.search)?(0,t.createElement)(p,{id:i,type:"nisje-feed-frontpage",search:r.search}):(0,t.createElement)(e,r)})),(0,r.addFilter)("nisje.groups.frontpage","nisje/feedLayouts/frontpage",(e=>n=>{const r=(0,s.getConstant)(`feedLayouts.groups.${n.id}`,0);return 0===r?(0,t.createElement)(e,n):(0,t.createElement)(p,{id:r,type:"nisje-feed-group"})})),(0,i.registerPlugin)("feed-layouts",{render:()=>(0,t.createElement)(a.PluginRoutes,null,(0,t.createElement)(o.Route,{path:"/feed-layout/:id",component:f}))}),(window.nisje=window.nisje||{}).pluginFeedLayouts=e}();