(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[45],{537:function(e,t,n){"use strict";var c=Object.assign||function(e){for(var t,n=1;n{const[e,t]=Object(c.useState)(null),{updateOptions:n}=Object(a.useDispatch)(m.OPTIONS_STORE_NAME),{installAndActivatePlugins:u}=Object(a.useDispatch)(m.PLUGINS_STORE_NAME),{displayable:O,recommendedPlugins:f,isLoading:j}=Object(a.useSelect)(g),h=Object(c.useRef)(!1),y=O&&f&&f.length>0;if(Object(c.useEffect)(()=>{if((y||v&&!j)&&!h.current){h.current=!0;const e=(f||[]).reduce((e,t)=>t.product?{...e,[t.product.replace(/\-/g,"_")+"_displayed"]:!0}:e,{woocommerce_payments_displayed:!!v});Object(d.recordEvent)("settings_payments_recommendations_pageview",e)}},[y,v,j]),!y)return null;const E=()=>{Object(d.recordEvent)("settings_payments_recommendations_dismiss",{}),n({[w]:"yes"})},N=(f||[]).map(n=>({key:n.slug,title:Object(c.createElement)(c.Fragment,null,n.title,n.recommended&&Object(c.createElement)(s.Pill,null,Object(o.__)("Recommended",'woocommerce'))),content:Object(r.decodeEntities)(n.copy),after:Object(c.createElement)(i.Button,{isSecondary:!0,onClick:()=>(n=>{e||(t(n.product),Object(d.recordEvent)("settings_payments_recommendations_setup",{extension_selected:n.product}),u([n.product]).then(()=>{window.location.href=Object(p.e)(n["setup-link"].replace("/wp-admin/",""))}).catch(e=>{Object(b.a)(e),t(null)}))})(n),isBusy:e===n.product,disabled:!!e},n["button-text"]),before:Object(c.createElement)("img",{src:n.icon,alt:""})}));return Object(c.createElement)(i.Card,{size:"medium",className:"woocommerce-recommended-payments-card"},Object(c.createElement)(i.CardHeader,null,Object(c.createElement)("div",{className:"woocommerce-recommended-payments-card__header"},Object(c.createElement)(l.Text,{variant:"title.small",as:"p",size:"20",lineHeight:"28px"},Object(o.__)("Recommended ways to get paid",'woocommerce')),Object(c.createElement)(l.Text,{className:"woocommerce-recommended-payments__header-heading",variant:"caption",as:"p",size:"12",lineHeight:"16px"},Object(o.__)('We recommend adding one of the following payment extensions to your store. The extension will be installed and activated for you when you click "Get started".','woocommerce'))),Object(c.createElement)("div",{className:"woocommerce-card__menu woocommerce-card__header-item"},Object(c.createElement)(s.EllipsisMenu,{label:Object(o.__)("Task List Options",'woocommerce'),renderContent:()=>Object(c.createElement)("div",{className:"woocommerce-review-activity-card__section-controls"},Object(c.createElement)(i.Button,{onClick:E},Object(o.__)("Hide this",'woocommerce')))}))),Object(c.createElement)(s.List,{items:N}),Object(c.createElement)(i.CardFooter,null,Object(c.createElement)(i.Button,{href:"https://woocommerce.com/product-category/woocommerce-extensions/payment-gateways/?utm_source=payments_recommendations",target:"_blank",isTertiary:!0},Object(o.__)("See more options",'woocommerce'),Object(c.createElement)(_.a,{size:18}))))}},61:function(e,t,n){"use strict";var c=Object.assign||function(e){for(var t,n=1;n