this.nisje=this.nisje||{},this.nisje.views=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=527)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},18:function(e,t){!function(){e.exports=this.wp.components}()},20:function(e,t){!function(){e.exports=this.wp.data}()},25:function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,u=e[Symbol.iterator]();!(r=(c=u.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return n}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}n.d(t,"a",(function(){return r}))},3:function(e,t){!function(){e.exports=this.lodash}()},35:function(e,t){!function(){e.exports=this.nisje.viewport}()},36:function(e,t){!function(){e.exports=this.nisje.history}()},37:function(e,t){!function(){e.exports=this.wp.apiFetch}()},4:function(e,t){!function(){e.exports=this.nisje.components}()},527:function(e,t,n){"use strict";n.r(t),n.d(t,"DeleteModal",(function(){return d})),n.d(t,"Message",(function(){return h}));var r=n(25),o=n(0),i=n(3),c=n(1),u=n(18),s=n(20),a=n(37),l=n.n(a),f=n(4),p=n(36),b=n.n(p);var d=function(e){var t=e.message,n=e.onRequestClose,a=e.onSuccess,p=void 0===a?i.noop:a,d=e.redirect,j=void 0!==d&&d,h=e.restPath,m=e.successMessage,O=e.title,v=Object(o.useState)(!1),y=Object(r.a)(v,2),_=y[0],g=y[1],w=Object(o.useState)(!1),x=Object(r.a)(w,2),E=x[0],S=x[1],M=Object(s.useDispatch)("nisje/notices").createInfoNotice;return Object(o.createElement)(u.Modal,{closeButtonLabel:Object(c.__)("Cancel"),onRequestClose:n,title:O||Object(c.__)("Delete post?"),className:"views-delete-modal"},Object(o.createElement)("p",null,t||Object(c.__)("This will delete the post permanently")),E&&Object(o.createElement)(f.Notice,{status:"error"},E),Object(o.createElement)("div",{className:"views-delete-modal__actions"},Object(o.createElement)(f.ButtonGroup,null,Object(o.createElement)(f.Button,{isTertiary:!0,isConpact:!0,onClick:n},Object(c.__)("Cancel")),Object(o.createElement)(f.Button,{isDestructive:!0,isConpact:!0,onClick:function(){g(!0),l()({path:h,method:"DELETE"}).then((function(){M(m||Object(c.__)("Successfully deleted the post")),p(),j?b.a.replace(j):n()})).catch((function(e){S(e.message),g(!1)}))},isLoading:_},Object(c.__)("Delete")))))},j=n(35);var h=Object(j.withViewportMatch)({isHuge:"huge"})((function(e){var t=e.isHuge,n=e.icon,r=e.children;return Object(o.createElement)("div",{className:"views-message"},Object(o.createElement)("div",null,Object(o.createElement)(f.NisjeIcon,{icon:n,size:t?80:60}),Object(o.createElement)("p",null,r)))}))}});