(window.__wcAdmin_webpackJsonp=window.__wcAdmin_webpackJsonp||[]).push([[53],{542:function(e,t,s){"use strict";t.a=["products","payments","woocommerce-payments","tax","shipping","marketing","appearance"]},627:function(e,t,s){"use strict";s.r(t);var n=s(0),i=s(2),c=s(3),a=s(478),o=s(7),l=s(11),r=s(16),d=s(170),m=s(543),u=s(546),_=s(523),k=(s(529),s(542));t.default=({query:e,shouldRenderTask:t})=>{const{task:s}=e,{hideTaskList:O}=Object(o.useDispatch)(l.ONBOARDING_STORE_NAME),{updateOptions:p}=Object(o.useDispatch)(l.OPTIONS_STORE_NAME),{isResolving:b,taskLists:w}=Object(o.useSelect)(e=>({isResolving:e(l.ONBOARDING_STORE_NAME).isResolving("getTaskLists"),taskLists:e(l.ONBOARDING_STORE_NAME).getTaskLists()}));Object(n.useEffect)(()=>{p({woocommerce_task_list_prompt_shown:!0})},[w,b]);const h=(()=>{if(!s)return null;const e=w.reduce((e,t)=>[...e,...t.tasks],[]).find(e=>e.id===s);return e||null})();if(s&&!h)return null;if(b)return Object(n.createElement)(_.a,{query:e});if(h&&t)return Object(n.createElement)("div",{className:"woocommerce-task-dashboard__container"},Object(n.createElement)(m.a,{query:e,task:h}));const E=w.find(e=>"extended"===e.id),g=w.find(e=>"setup"===e.id);if(E.tasks=[...new Set(E.tasks.concat((null==g?void 0:g.tasks.filter(e=>!k.a.includes(e.id)&&"store_details"!==e.id))||[]))],0===E.tasks.length)return null;const f=E.tasks.filter(e=>e.completed).length===E.tasks.length,{id:j,isHidden:N,isVisible:y,isToggleable:R,title:T,tasks:A}=E;return y?Object(n.createElement)(n.Fragment,{key:j},Object(n.createElement)(u.a,{id:j,isComplete:f,query:e,tasks:A,title:T}),R&&Object(n.createElement)(d.a,null,Object(n.createElement)(c.MenuGroup,{className:"woocommerce-layout__homescreen-display-options",label:Object(i.__)("Display",'woocommerce')},Object(n.createElement)(c.MenuItem,{className:"woocommerce-layout__homescreen-extension-tasklist-toggle",icon:!N&&a.a,isSelected:!N,role:"menuitemcheckbox",onClick:()=>(e=>{const{id:t,isHidden:s}=e,n=!s;Object(r.recordEvent)(n?t+"_tasklist_hide":t+"_tasklist_show",{}),O(t)})(E)},Object(i.__)("Show things to do next",'woocommerce'))))):null}}}]);