import { __decorateMetadata } from "../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorateMetadata.mjs";
import { __decorate } from "../../../../../_virtual/_@oxc-project_runtime@0.94.0/helpers/decorate.mjs";
import { L10nDecorator } from "./L10nDecorator.mjs";
import { Expose, Type } from "class-transformer";
import { IsInstance, IsOptional, ValidateNested } from "class-validator";

//#region ../didcomm/src/decorators/l10n/L10nDecoratorExtension.ts
function L10nDecorated(Base) {
	var _ref;
	class L10nDecoratorExtension extends Base {
		addLocale(locale) {
			this.l10n = new L10nDecorator({ locale });
		}
		getLocale() {
			if (this.l10n?.locale) return this.l10n.locale;
		}
	}
	__decorate([
		Expose({ name: "~l10n" }),
		Type(() => L10nDecorator),
		ValidateNested(),
		IsOptional(),
		IsInstance(L10nDecorator),
		__decorateMetadata("design:type", typeof (_ref = typeof L10nDecorator !== "undefined" && L10nDecorator) === "function" ? _ref : Object)
	], L10nDecoratorExtension.prototype, "l10n", void 0);
	return L10nDecoratorExtension;
}

//#endregion
export { L10nDecorated };
//# sourceMappingURL=L10nDecoratorExtension.mjs.map