/*
 * Copyright 2020-2025 VMware, Inc. All rights reserved. VMware Confidential
 */

import { Pipe, PipeTransform } from "@angular/core";
import { TranslationSet } from "@vcd/i18n";
import { PluginUtilService } from "../extensibility/plugin-util.service";

@Pipe({ name: "getExtensionString" })
export class ExtensionManifestLocalization implements PipeTransform {
    constructor(private pluginUtilService: PluginUtilService) {}

    public transform<T>(text: string, translations: TranslationSet): string {
        return this.pluginUtilService.translate(text, translations);
    }
}
