(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{121:function(t,e,n){"use strict";n.r(e);var c=n(0),a=n(13);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],c=!0,a=!1,o=void 0;try{for(var l,s=t[Symbol.iterator]();!(c=(l=s.next()).done)&&(n.push(l.value),!e||n.length!==e);c=!0);}catch(t){a=!0,o=t}finally{try{c||null==s.return||s.return()}finally{if(a)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var l=function(t){var e=t.initialStatus,n=t.url,l=t.pluginUrl,s=t.pluginLink,i=o(Object(c.useState)("installed"),2),r=i[0],u=i[1],b=o(Object(c.useState)(!1),2),y=b[0],m=b[1],d=Object(c.useRef)(null);return Object(c.useEffect)(function(){u(e)},[]),Object(c.createElement)("div",{ref:d},Object(c.createElement)("button",{onClick:function(){d.current.closest(".notice-blocksy-plugin").parentNode.removeChild(d.current.closest(".notice-blocksy-plugin")),$.ajax(ajaxurl,{type:"POST",data:{action:"blocksy_dismissed_notice_handler"}})},type:"button",className:"notice-dismiss"},Object(c.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Dismiss this notice.","blocksy"))),Object(c.createElement)("h1",null,Object(a.__)("Congratulations!","blocksy")),Object(c.createElement)("p",{className:"about-description"},Object(a.__)("Blocksy theme is now active and ready to use.","blocksy")),Object(c.createElement)("p",{dangerouslySetInnerHTML:{__html:Object(a.__)("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.","blocksy")}}),Object(c.createElement)("div",{className:"notice-actions"},"uninstalled"===r&&Object(c.createElement)("a",{className:"button button-primary",href:s,target:"_blank"},Object(a.__)("Download Blocksy Companion","blocksy")),"uninstalled"!==r&&Object(c.createElement)("button",{disabled:y||"active"===r,onClick:function(){m(!0),setTimeout(function(){}),$.ajax(ajaxurl,{type:"POST",data:{action:"blocksy_notice_button_click"}}).then(function(t){var e=t.success,n=t.data;e&&(u(n.status),"active"===n.status&&location.assign(l)),m(!1)})},className:"button button-primary"},y&&Object(c.createElement)("i",{className:"dashicons dashicons-update"}),y?Object(a.__)("Activating...","blocksy"):"uninstalled"===r?Object(a.__)("Install Blocksy Companion","blocksy"):"installed"===r?Object(a.__)("Activate Blocksy Companion","blocksy"):Object(a.__)("Blocksy Companion active!","blocksy")),Object(c.createElement)("a",{href:n,className:"button"},Object(a.__)("Theme Dashboard","blocksy"))))};n.d(e,"mount",function(){return s});var s=function(t){Object(c.render)(Object(c.createElement)(l,{initialStatus:t.querySelector(".notice-blocksy-plugin-root").dataset.pluginStatus,url:t.querySelector(".notice-blocksy-plugin-root").dataset.url,pluginUrl:t.querySelector(".notice-blocksy-plugin-root").dataset.pluginUrl,pluginLink:t.querySelector(".notice-blocksy-plugin-root").dataset.link}),t.querySelector(".notice-blocksy-plugin-root"))}}}]);