System.register(["../../common/sanitize-legacy.f0efe7e6.js"],function(e,t){"use strict";var n;return{setters:[e=>{n=e.s}],execute:function(){var e=document.createElement("style");e.textContent=".acfw-analytics-upsell{margin:0 40px 70px}.acfw-recommend-extensions-upsell{margin:0 auto 70px}.acfw-recommend-extensions-upsell.max-width{max-width:1032px}.acfw-recommend-extensions-upsell .components-card .sub-label{font-size:15px!important}#acfw-admin-app .components-card .title{margin:0}#acfw-admin-app .components-card .stars{color:#ffb100}#acfw-admin-app .components-card .description{font-size:16px;font-size:1rem;line-height:1.5;color:#646970;margin-bottom:16px;font-weight:400}#acfw-admin-app .components-card .upgrade-btn{display:inline-block;padding:10px 15px;margin-right:15px;background:#dbe41d;border:1px solid #c9d034;color:#000;font-size:16px;font-weight:700;text-decoration:none}#acfw-admin-app .components-card a.upgrade-btn:hover{background:#cdd61c;border:1px solid #c9d034}#acfw-admin-app .components-card .sub-label{font-size:16px}\n",document.head.appendChild(e);const{sharedProps:t,analyticsUpsell:a,recommendExtensions:c}=acfwWCAdmin,r=()=>{const{title:e,description:c}=a,{upgradePremium:r,premiumLink:l,bonusText:s}=t;return React.createElement("div",{className:"acfw-analytics-upsell"},React.createElement(wp.components.Card,{className:"woocommerce-card"},React.createElement(wp.components.CardHeader,null,React.createElement("h2",{className:"title"},e)),React.createElement(wp.components.CardBody,null,React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:n(c)}}),React.createElement("a",{className:"upgrade-btn",href:l},r),React.createElement("span",{className:"sub-label",dangerouslySetInnerHTML:{__html:n(s)}}))))},l=document.getElementById("posts-filter"),s=()=>{const{title:e,description:a}=c,{upgradePremium:r,premiumLink:s,bonusText:m}=t;return React.createElement("div",{className:"acfw-recommend-extensions-upsell "+(l?"":"max-width")},React.createElement(wp.components.Card,{title:e},React.createElement(wp.components.CardHeader,null,React.createElement("h2",{className:"title"},e)),React.createElement(wp.components.CardBody,null,React.createElement("p",{className:"description",dangerouslySetInnerHTML:{__html:n(a)}}),React.createElement("a",{className:"upgrade-btn",href:s},r),React.createElement("span",{className:"sub-label",dangerouslySetInnerHTML:{__html:n(m)}}))))},m=wc.navigation,{getHistory:o,getPath:p}=m,d=wp.element.createContext({path:"",setPath:null}),i=e=>{const{children:t}=e,[n,a]=wp.element.useState(""),c=o();return wp.element.useEffect(()=>{a(p())},[]),c.listen(e=>{a(e.pathname)}),React.createElement(d.Provider,{value:{path:n,setPath:a}},t)},u=e=>{const{path:t,render:n}=e,a=wp.element.useContext(d);return"string"==typeof t&&t!==a.path||Array.isArray(t)&&t.findIndex(e=>e===a.path)<0?null:n()},w=document.getElementById("posts-filter"),h=()=>React.createElement("div",{id:"acfw-admin-app"},React.createElement(i,null,React.createElement(u,{key:"upsell",path:"/analytics/coupons",render:()=>React.createElement(r,null)}),React.createElement(u,{key:"recommended-extensions",path:"/marketing",render:()=>React.createElement(s,null)})),w?React.createElement(s,null):null);wp.domReady(()=>{const e=document.querySelector("#wpbody-content .wrap");e&&wp.element.render(React.createElement(h,null),e.appendChild(document.createElement("div")))})}}});
