import { UmbMoveDocumentTypeServerDataSource } from './document-type-move.server.data-source.js';
import { UMB_NOTIFICATION_CONTEXT } from '../../../../../core/notification/index.js';
import { UmbRepositoryBase } from '../../../../../core/repository/index.js';
export class UmbMoveDocumentTypeRepository extends UmbRepositoryBase {
    #moveSource = new UmbMoveDocumentTypeServerDataSource(this);
    async requestMoveTo(args) {
        const { error } = await this.#moveSource.moveTo(args);
        if (!error) {
            const notificationContext = await this.getContext(UMB_NOTIFICATION_CONTEXT);
            if (!notificationContext) {
                throw new Error('Notification context not found');
            }
            const notification = { data: { message: `Moved` } };
            notificationContext.peek('positive', notification);
        }
        return { error };
    }
}
export { UmbMoveDocumentTypeRepository as api };
