import { UMB_USER_PERMISSION_DOCUMENT_DELETE } from '../../../user-permissions/document/constants.js';
import { UMB_DOCUMENT_ENTITY_TYPE } from '../../../entity.js';
import { UMB_DOCUMENT_ITEM_REPOSITORY_ALIAS } from '../../../item/constants.js';
import { UMB_DOCUMENT_RECYCLE_BIN_REPOSITORY_ALIAS } from '../../repository/constants.js';
import { UMB_DOCUMENT_REFERENCE_REPOSITORY_ALIAS } from '../../../reference/constants.js';
import { UMB_DOCUMENT_COLLECTION_ALIAS } from '../../../collection/constants.js';
import { UMB_COLLECTION_ALIAS_CONDITION } from '../../../../../core/collection/index.js';
import { UMB_ENTITY_BULK_ACTION_TRASH_WITH_RELATION_KIND } from '../../../../../relations/relations/index.js';
import { UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS } from '../../../../../core/recycle-bin/index.js';
export const manifests = [
    {
        type: 'entityBulkAction',
        kind: UMB_ENTITY_BULK_ACTION_TRASH_WITH_RELATION_KIND,
        alias: 'Umb.EntityBulkAction.Document.Trash',
        name: 'Trash Document Entity Bulk Action',
        api: () => import('./document-bulk-trash-with-relation.action.js'),
        weight: 10,
        forEntityTypes: [UMB_DOCUMENT_ENTITY_TYPE],
        meta: {
            itemRepositoryAlias: UMB_DOCUMENT_ITEM_REPOSITORY_ALIAS,
            recycleBinRepositoryAlias: UMB_DOCUMENT_RECYCLE_BIN_REPOSITORY_ALIAS,
            referenceRepositoryAlias: UMB_DOCUMENT_REFERENCE_REPOSITORY_ALIAS,
        },
        conditions: [
            {
                alias: UMB_COLLECTION_ALIAS_CONDITION,
                match: UMB_DOCUMENT_COLLECTION_ALIAS,
            },
            {
                alias: 'Umb.Condition.UserPermission.Document',
                allOf: [UMB_USER_PERMISSION_DOCUMENT_DELETE],
            },
            {
                alias: UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS,
            },
        ],
    },
];
