import { UmbMoveMediaTypeServerDataSource } from './media-type-move.server.data-source.js';
import { UMB_NOTIFICATION_CONTEXT } from '../../../../../core/notification/index.js';
import { UmbRepositoryBase } from '../../../../../core/repository/index.js';
export class UmbMoveMediaTypeRepository extends UmbRepositoryBase {
    #moveSource = new UmbMoveMediaTypeServerDataSource(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(`Failed to load notification context`);
            }
            const notification = { data: { message: `Moved` } };
            notificationContext.peek('positive', notification);
        }
        return { error };
    }
}
export { UmbMoveMediaTypeRepository as api };
