(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{97:function(t,e,n){"use strict";n.r(e);var a=n(0),c=n(27);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],a=!0,c=!1,o=void 0;try{for(var i,l=t[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!e||n.length!==e);a=!0);}catch(t){c=!0,o=t}finally{try{a||null==l.return||l.return()}finally{if(c)throw o}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var i=function(t){var e=t.initialStatus,n=t.url,i=t.pluginUrl,l=t.pluginLink,r=o(Object(a.useState)("installed"),2),s=r[0],u=r[1],b=o(Object(a.useState)(!1),2),m=b[0],d=b[1],y=Object(a.useRef)(null);return Object(a.useEffect)(function(){u(e)},[]),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"},"uninstalled"===s&&Object(a.createElement)("a",{className:"button button-primary",href:l,target:"_blank"},Object(c.__)("Download Blocksy Companion")),"uninstalled"!==s&&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(t){var e=t.success,n=t.data;e&&(u(n.status),"active"===n.status&&location.assign(i)),d(!1)})},className:"button button-primary"},m&&Object(a.createElement)("i",{className:"dashicons dashicons-update"}),m?Object(c.__)("Activating..."):"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(e,"mount",function(){return l});var l=function(t){Object(a.render)(Object(a.createElement)(i,{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"))}}}]);