hunk.code_window:   useSensor,
     useSensors,
   } from '@dnd-kit/core';
   import { Workspace } from '@toeverything/infra';
   import { useService } from '@toeverything/infra/di';
   import { useAtom, useAtomValue, useSetAtom } from 'jotai';
   import type { PropsWithChildren, ReactNode } from 'react';
   import { lazy, Suspense, useCallback, useEffect, useState } from 'react';
  
hunk.labels: keep keep keep replace keep keep keep keep
hunk.after_edit: import { PageRecordList, useLiveData, Workspace } from '@toeverything/infra';
  
hunk.file_path: packages/frontend/core/src/layouts/workspace-layout.tsx
hunk.type: replace
file: import { ConfirmModal } from '@affine/component';
  import { WorkspacePropertiesAdapter } from '@affine/core/modules/workspace';
  import type { PageInfoCustomPropertyMeta } from '@affine/core/modules/workspace/properties/schema';
  import { Trans } from '@affine/i18n';
  import { useAFFiNEI18N } from '@affine/i18n/hooks';
  import { useService } from '@toeverything/infra/di';
  import { useMemo } from 'react';
  
  import { PagePropertiesMetaManager } from './page-properties-manager';
  
  export const ConfirmDeletePropertyModal = ({
    onConfirm,
    onCancel,
    property,
    show,
  }: {
    property: PageInfoCustomPropertyMeta;
    show: boolean;
    onConfirm: () => void;
    onCancel: () => void;
  }) => {
    const t = useAFFiNEI18N();
    const adapter = useService(WorkspacePropertiesAdapter);
    const count = useMemo(() => {
      const manager = new PagePropertiesMetaManager(adapter);
      return manager.getPropertyRelatedPages(property.id)?.size || 0;
    }, [adapter, property.id]);
  
    return (
      <ConfirmModal
        open={show}
        closeButtonOptions={{
          onClick: onCancel,
        }}
        title={t['com.affine.settings.workspace.properties.delete-property']()}
        description={
          <Trans
            values={{
              name: property.name,
              count,
            }}
            i18nKey="com.affine.settings.workspace.properties.delete-property-prompt"
          >
            The <strong>{{ name: property.name } as any}</strong> property will be
            removed from count doc(s). This action cannot be undone.
          </Trans>
        }
        onConfirm={onConfirm}
        cancelButtonOptions={{
          onClick: onCancel,
        }}
        confirmButtonOptions={{
          type: 'error',
          children: t['Confirm'](),
        }}
      />
    );
  };
  