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=545)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},17:function(e,t){!function(){e.exports=this.wp.components}()},18:function(e,t){!function(){e.exports=this.wp.data}()},22:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(29);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(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)||Object(r.a)(e,t)||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.")}()}},24:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},29:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(24);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},3:function(e,t){!function(){e.exports=this.lodash}()},36:function(e,t){!function(){e.exports=this.nisje.viewport}()},38:function(e,t){!function(){e.exports=this.wp.apiFetch}()},40:function(e,t){!function(){e.exports=this.nisje.history}()},5:function(e,t){!function(){e.exports=this.nisje.components}()},545:function(e,t,n){"use strict";n.r(t),n.d(t,"DeleteModal",(function(){return d})),n.d(t,"Message",(function(){return m}));var r=n(22),o=n(0),i=n(3),c=n(1),u=n(17),s=n(18),a=n(38),l=n.n(a),f=n(5),p=n(40),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,m=e.restPath,h=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,{className:"views-delete-modal",closeButtonLabel:Object(c.__)("Cancel"),onRequestClose:n,title:O||Object(c.__)("Delete post?")},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,onClick:n,__experimentalDesign:!0},Object(c.__)("Cancel")),Object(o.createElement)(f.Button,{isDestructive:!0,isLoading:_,onClick:function(){g(!0),l()({path:m,method:"DELETE"}).then((function(){M(h||Object(c.__)("Successfully deleted the post")),p(),j?b.a.replace(j):n()})).catch((function(e){S(e.message),g(!1)}))},__experimentalDesign:!0},Object(c.__)("Delete")))))},j=n(36);var m=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,n&&Object(o.createElement)(f.NisjeIcon,{icon:n,size:t?80:60}),Object(o.createElement)("p",null,r)))}))}});