import { UMB_TRASH_WITH_RELATION_CONFIRM_MODAL } from './modal/constants.js';
import { umbOpenModal } from '../../../../core/modal/index.js';
import { UmbTrashEntityAction } from '../../../../core/recycle-bin/index.js';
/**
 * Entity action for trashing an item with relations.
 * @class UmbTrashWithRelationEntityAction
 * @augments {UmbEntityActionBase<MetaEntityActionTrashWithRelationKind>}
 */
export class UmbTrashWithRelationEntityAction extends UmbTrashEntityAction {
    async _confirmTrash(item) {
        await umbOpenModal(this, UMB_TRASH_WITH_RELATION_CONFIRM_MODAL, {
            data: {
                unique: item.unique,
                entityType: item.entityType,
                itemRepositoryAlias: this.args.meta.itemRepositoryAlias,
                referenceRepositoryAlias: this.args.meta.referenceRepositoryAlias,
                itemDataResolver: this.args.meta.itemDataResolver,
            },
        });
    }
}
export { UmbTrashWithRelationEntityAction as api };
