!function(){var e={94184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var s=r.apply(null,n);s&&e.push(s)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var c in n)o.call(n,c)&&n[c]&&e.push(c);else e.push(n.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o);var e=window.wp.blocks,t=window.wp.element,r=window.wp.primitives,i=(0,t.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(r.Path,{d:"M12 3.3c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8s-4-8.8-8.8-8.8zm6.5 5.5h-2.6C15.4 7.3 14.8 6 14 5c2 .6 3.6 2 4.5 3.8zm.7 3.2c0 .6-.1 1.2-.2 1.8h-2.9c.1-.6.1-1.2.1-1.8s-.1-1.2-.1-1.8H19c.2.6.2 1.2.2 1.8zM12 18.7c-1-.7-1.8-1.9-2.3-3.5h4.6c-.5 1.6-1.3 2.9-2.3 3.5zm-2.6-4.9c-.1-.6-.1-1.1-.1-1.8 0-.6.1-1.2.1-1.8h5.2c.1.6.1 1.1.1 1.8s-.1 1.2-.1 1.8H9.4zM4.8 12c0-.6.1-1.2.2-1.8h2.9c-.1.6-.1 1.2-.1 1.8 0 .6.1 1.2.1 1.8H5c-.2-.6-.2-1.2-.2-1.8zM12 5.3c1 .7 1.8 1.9 2.3 3.5H9.7c.5-1.6 1.3-2.9 2.3-3.5zM10 5c-.8 1-1.4 2.3-1.8 3.8H5.5C6.4 7 8 5.6 10 5zM5.5 15.3h2.6c.4 1.5 1 2.8 1.8 3.7-1.8-.6-3.5-2-4.4-3.7zM14 19c.8-1 1.4-2.2 1.8-3.7h2.6C17.6 17 16 18.4 14 19z"})),s=window.React,c=n(94184),l=n.n(c),a=window.wp.i18n,u=window.wp.blockEditor,p=window.wp.data,d=window.nisje.components,w=window.nisje.icons,f=window.nisje.fullSiteEditing;const m="dekode-wiki";(0,e.registerBlockType)("nisje/card-wiki",{icon:i,edit:function(e){let{attributes:n,setAttributes:o}=e;const{postId:r}=n,{GridSizeToolbar:i,sizeClassNames:c}=(0,f.useGridSize)(),[v,g]=(0,f.useDarkClassname)(),[y,h]=(0,s.useState)(!1),b=(0,u.useBlockProps)({style:g,className:l()("editor-wiki-post",c,v)}),{BackgroundColor:S,InspectorControlsColorPanel:j}=(0,u.__experimentalUseColors)([{name:"backgroundColor"}]),z=(0,p.useSelect)((e=>{if(0===r)return(0,a.__)("Currently showing latest post","nisje");const t=e("core").getEntityRecord("postType",m,r);return(null==t?void 0:t.title.rendered)||"..."}),[r]),E=0!==r;return(0,t.createElement)(t.Fragment,null,i,(0,t.createElement)(f.PostSelectorPanel,{hasSelected:E,onOpen:()=>h(!0),onRemove:()=>o({postId:0})}),j,(0,t.createElement)(S,null,(0,t.createElement)(d.BaseCard,b,(0,t.createElement)("div",null,(0,t.createElement)(w.Icon,{icon:w.globe,size:40}),(0,t.createElement)(d.TextDeprecated,{as:"h2",variant:"title-medium"},(0,a.__)("Wiki post","nisje")),(0,t.createElement)(d.TextDeprecated,{as:"p"},z)))),y&&(0,t.createElement)(f.PostSelector,{onRequestClose:()=>h(!1),onSelect:e=>o({postId:e}),postType:m}))}})}(),(window.nisje=window.nisje||{}).pluginWikiAdmin=o}();