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