(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{93:function(t,e,n){"use strict";n.r(e);var a=n(0),c=n(28),o=function(){return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return 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&&l.return&&l.return()}finally{if(c)throw o}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=function(t){var e=t.initialStatus,n=t.url,i=t.pluginUrl,l=t.pluginLink,r=Object(a.useState)("installed"),s=o(r,2),u=s[0],b=s[1],m=Object(a.useState)(!1),d=o(m,2),y=d[0],p=d[1],j=Object(a.useRef)(null);return Object(a.useEffect)(function(){b(e)},[]),Object(a.createElement)("div",{ref:j},Object(a.createElement)("button",{onClick:function(){j.current.closest(".notice-blocksy-plugin").parentNode.removeChild(j.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"===u&&Object(a.createElement)("a",{className:"button button-primary",href:l,target:"_blank"},Object(c.__)("Download Blocksy Companion")),"uninstalled"!==u&&Object(a.createElement)("button",{disabled:y||"active"===u,onClick:function(){p(!0),setTimeout(function(){}),$.ajax(ajaxurl,{type:"POST",data:{action:"blocksy_notice_button_click"}}).then(function(t){var e=t.success,n=t.data;e&&(b(n.status),"active"===n.status&&location.assign(i)),p(!1)})},className:"button button-primary"},y&&Object(a.createElement)("i",{className:"dashicons dashicons-update"}),y?Object(c.__)("Activating..."):"uninstalled"===u?Object(c.__)("Install Blocksy Companion"):"installed"===u?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"))}}}]);