(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{93:function(e,t,n){"use strict";n.r(t);var a=n(0),c=n(28),o=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,c=!1,o=void 0;try{for(var r,i=e[Symbol.iterator]();!(a=(r=i.next()).done)&&(n.push(r.value),!t||n.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{!a&&i.return&&i.return()}finally{if(c)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(e){var t=e.initialStatus,n=e.url,r=Object(a.useState)("installed"),i=o(r,2),s=i[0],l=i[1],u=Object(a.useState)(!1),b=o(u,2),m=b[0],d=b[1],y=Object(a.useRef)(null);return Object(a.useEffect)(function(){l(t)},[]),Object(a.createElement)("div",{ref:y},Object(a.createElement)("button",{onClick:function(){y.current.closest(".notice-blocksy-plugin").parentNode.removeChild(y.current.closest(".notice-blocksy-plugin")),$.ajax(ajaxurl,{type:"POST",data:{action:"blocksy_dismissed_notice_handler"}})},type:"button",className:"notice-dismiss"},Object(a.createElement)("span",{className:"screen-reader-text"},Object(c.__)("Dismiss this notice."))),Object(a.createElement)("h1",null,Object(c.__)("Congratulations!")),Object(a.createElement)("p",{className:"about-description"},Object(c.__)("Blocksy theme is now active and ready to use.")),Object(a.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(c.__)("To get full advantage of it, we strongly recommend to activate the Blocksy Companion Plugin. This way you will have access to custom extensions, demo templates and many other awesome features.")}}),Object(a.createElement)("div",{className:"notice-actions"},Object(a.createElement)("button",{disabled:m||"active"===s,onClick:function(){d(!0),setTimeout(function(){}),$.ajax(ajaxurl,{type:"POST",data:{action:"blocksy_notice_button_click"}}).then(function(e){var t=e.success,n=e.data;t&&l(n.status),d(!1)})},className:"button button-primary"},m?Object(c.__)("Loading..."):"uninstalled"===s?Object(c.__)("Install Blocksy Companion"):"installed"===s?Object(c.__)("Activate Blocksy Companion"):Object(c.__)("Blocksy Companion active!")),Object(a.createElement)("a",{href:n,className:"button"},Object(c.__)("Theme Dashboard"))))};n.d(t,"mount",function(){return i});var i=function(e){Object(a.render)(Object(a.createElement)(r,{initialStatus:e.querySelector(".notice-blocksy-plugin-root").dataset.pluginStatus,url:e.querySelector(".notice-blocksy-plugin-root").dataset.url}),e.querySelector(".notice-blocksy-plugin-root"))}}}]);