Skip to content

The open alternative to Salesforce, designed for AI.

772 B
Raw Blame
import { createAtomComponentState } from '@/ui/utilities/state/jotai/utils/createAtomComponentState';
import { PageLayoutType } from '~/generated-metadata/graphql';

import { type DraftPageLayout } from '@/page-layout/types/DraftPageLayout';
import { PageLayoutComponentInstanceContext } from './contexts/PageLayoutComponentInstanceContext';

export const pageLayoutDraftComponentState =
  createAtomComponentState<DraftPageLayout>({
    key: 'pageLayoutDraftComponentState',
    defaultValue: {
      id: '',
      name: '',
      type: PageLayoutType.DASHBOARD,
      objectMetadataId: null,
      tabs: [],
      defaultTabToFocusOnMobileAndSidePanelId: null,
      isFirstTabPinned: true,
    },
    componentInstanceContext: PageLayoutComponentInstanceContext,
  });