"use strict";(self.webpackChunk_wcAdmin_webpackJsonp=self.webpackChunk_wcAdmin_webpackJsonp||[]).push([[1920],{57038:function(e,t,s){s.r(t);var n=s(69307),i=s(65736),o=s(55609),l=s(86158),c=s(9818),a=s(67221),r=s(14599),m=s(27240),_=s(23720),u=s(76388);t.default=e=>{let{query:t}=e;const{hideTaskList:s}=(0,c.useDispatch)(a.ONBOARDING_STORE_NAME),{updateOptions:k}=(0,c.useDispatch)(a.OPTIONS_STORE_NAME),{task:d}=t,{isResolving:p,taskLists:h}=(0,c.useSelect)((e=>({isResolving:e(a.ONBOARDING_STORE_NAME).isResolving("getTaskListsByIds"),taskLists:e(a.ONBOARDING_STORE_NAME).getTaskListsByIds(["extended_two_column"])})));if((0,n.useEffect)((()=>{k({woocommerce_task_list_prompt_shown:!0})}),[h,p]),d)return null;if(p)return(0,n.createElement)(u.S,{query:t});const E=h[0];if(!E||0===E.tasks.length)return null;const w=E.tasks.filter((e=>e.completed)).length===E.tasks.length,{id:g,eventPrefix:N,isHidden:O,isVisible:f,isToggleable:y,title:R,tasks:A}=E;return f?(0,n.createElement)(n.Fragment,{key:g},(0,n.createElement)(_.a,{id:g,eventPrefix:N,isComplete:w,query:t,tasks:A,title:R}),y&&(0,n.createElement)(m.z,null,(0,n.createElement)(o.MenuGroup,{className:"woocommerce-layout__homescreen-display-options",label:(0,i.__)("Display","woocommerce")},(0,n.createElement)(o.MenuItem,{className:"woocommerce-layout__homescreen-extension-tasklist-toggle",icon:!O&&l.Z,isSelected:!O,role:"menuitemcheckbox",onClick:()=>(e=>{const{id:t,isHidden:n}=e,i=!n;(0,r.recordEvent)(i?`${t}_tasklist_hide`:`${t}_tasklist_show`,{}),s(t)})(E)},(0,i.__)("Show things to do next","woocommerce"))))):null}}}]);