import{s as r}from"../../common/sanitize.d66553f0.js";function x(){import.meta.url,import("_").catch(()=>1);async function*e(){}}const{sharedProps:o,analyticsUpsell:i,recommendExtensions:d}=acfwWCAdmin;const u=()=>{const{title:e,description:t}=i,{upgradePremium:a,premiumLink:n,bonusText:c}=o;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:r(t)}}),React.createElement("a",{className:"upgrade-btn",href:n},a),React.createElement("span",{className:"sub-label",dangerouslySetInnerHTML:{__html:r(c)}}))))};const R=document.getElementById("posts-filter"),l=()=>{const{title:e,description:t}=d,{upgradePremium:a,premiumLink:n,bonusText:c}=o;return React.createElement("div",{className:"acfw-recommend-extensions-upsell ".concat(R?"":"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:r(t)}}),React.createElement("a",{className:"upgrade-btn",href:n},a),React.createElement("span",{className:"sub-label",dangerouslySetInnerHTML:{__html:r(c)}}))))},E=wc.navigation,{getHistory:h,getPath:y}=E,m=wp.element.createContext({path:"",setPath:null}),w=e=>{const{children:t}=e,[a,n]=wp.element.useState(""),c=h();return wp.element.useEffect(()=>{n(y())},[]),c.listen(p=>{n(p.pathname)}),React.createElement(m.Provider,{value:{path:a,setPath:n}},t)},s=e=>{const{path:t,render:a}=e,n=wp.element.useContext(m);return typeof t=="string"&&t!==n.path||Array.isArray(t)&&t.findIndex(c=>c===n.path)<0?null:a()};const g=document.getElementById("posts-filter"),f=()=>React.createElement("div",{id:"acfw-admin-app"},React.createElement(w,null,React.createElement(s,{key:"upsell",path:"/analytics/coupons",render:()=>React.createElement(u,null)}),React.createElement(s,{key:"recommended-extensions",path:"/marketing",render:()=>React.createElement(l,null)})),g?React.createElement(l,null):null);wp.domReady(()=>{const e=document.querySelector("#wpbody-content .wrap");e&&wp.element.render(React.createElement(f,null),e.appendChild(document.createElement("div")))});export{x as __vite_legacy_guard};
