// dees tools
import * as deesWccTools from '@design.estate/dees-wcctools';
import * as deesDomTools from '@design.estate/dees-domtools';

// elements and pages
import * as elements from '../ts_web/elements/index.js';
import * as pages from '../ts_web/pages/index.js';

const fullPageElementNames = new Set([
  'IdpAdminShell',
  'IdpLandingPage',
  'IdpMobileShowcase',
]);

deesWccTools.setupWccTools({
  sections: [
    {
      name: 'Full Pages',
      type: 'pages',
      items: pages,
      icon: 'web',
    },
    {
      name: 'Composed Views',
      type: 'elements',
      items: elements,
      icon: 'dashboard',
      filter: (nameArg) => fullPageElementNames.has(nameArg) || ['IdpDashboardWindow', 'IdpLandingHero', 'IdpInboxPreview'].includes(nameArg),
    },
    {
      name: 'Primitives',
      type: 'elements',
      items: elements,
      icon: 'category',
      filter: (nameArg) => nameArg.startsWith('Idp') && !fullPageElementNames.has(nameArg) && !['IdpDashboardWindow', 'IdpLandingHero', 'IdpInboxPreview'].includes(nameArg),
    },
  ],
});
deesDomTools.elementBasic.setup();
