"use strict";(self.webpackChunk_digicommerce_cms_admin=self.webpackChunk_digicommerce_cms_admin||[]).push([[3981],{38364:(S,l,e)=>{e.r(l),e.d(l,{default:()=>P});var t=e(32735),m=e(5636),c=e(99357),g=e(5141),i=e(88425),p=e(11856),y=e(16540),d=e(9808),r=e(78330),u=e(78227),v=e(19615),h=e(60216),f=e.n(h),C=e(95602),H=e(90662);const E=(0,v.default)(H.Stack)`
  align-items: flex-start;
`,s=({hasCreatedContentType:o})=>{const{formatMessage:n}=(0,m.useIntl)();return t.createElement("div",null,t.createElement(d.Box,{paddingLeft:6,paddingBottom:10},t.createElement(E,{spacing:5},t.createElement(C.Typography,{as:"h1",variant:"alpha"},n(o?{id:"app.components.HomePage.welcome.again",defaultMessage:"Welcome \u{1F44B}"}:{id:"app.components.HomePage.welcome",defaultMessage:"Welcome on board!"})))))};s.defaultProps={hasCreatedContentType:void 0},s.propTypes={hasCreatedContentType:f().bool};const T=s,M=()=>{const{collectionTypes:o,singleTypes:n,isLoading:L}=(0,u.bP)(),{push:B}=(0,g.useHistory)(),x=a=>{a.preventDefault(),B("/plugins/content-type-builder/content-types/create-content-type")},F=(0,t.useMemo)(()=>{const a=G=>G.filter(I=>I.isDisplayed);return a(o).length>1||a(n).length>0},[o,n]);return L?t.createElement(i.LoadingIndicatorPage,null):t.createElement(p.Layout,null,t.createElement(m.FormattedMessage,{id:"HomePage.helmet.title",defaultMessage:"Homepage"},a=>t.createElement(c.Helmet,{title:a[0]})),t.createElement(y.Main,null,t.createElement(d.Box,{padding:10},t.createElement(r.Grid,null,t.createElement(r.GridItem,{col:8,s:12},t.createElement(T,{onCreateCT:x,hasCreatedContentType:F}))))))},P=(0,t.memo)(M)}}]);
