import { Data, Decoder, Encodeable, EncodeContext, Patchable, PatchType } from '@simonbackx/simple-encoding'; import { Language } from './Language.js'; type LanguageMapPatch = { [key in Language]?: string | null; }; export declare class TranslatedStringPatch implements Encodeable, Patchable { /** * Setting to null will remove the translation (if it exists). */ translations: LanguageMapPatch | string; constructor(translations: LanguageMapPatch | string); patch(patch: TranslatedStringPatch): this; encode(context: EncodeContext): string | { _isPatch: boolean; nl?: string | null | undefined; en?: string | null | undefined; fr?: string | null | undefined; }; } export declare class TranslatedString implements Encodeable, Patchable, StringLikeObject { translations: LanguageMap | string; constructor(translations?: LanguageMap | string); static create(translations?: LanguageMap | string): TranslatedString; get isDefault(): boolean; fallback(str: string): string; get length(): number; toString(): string; valueOf(): string; trim(): string; toLowerCase(): string; toUpperCase(): string; toLocaleLowerCase(): string; toLocaleUpperCase(): string; substr(start: number, length?: number): string; substring(start: number, end?: number): string; normalize(form?: string): string; replace(searchValue: string | RegExp, replaceValue: string): string; charAt(index: number): string; slice(start: number, end?: number): string; split(separator: string | RegExp, limit?: number): string[]; startsWith(searchString: string, position?: number): boolean; match(regexp: string | RegExp): RegExpMatchArray | null; patch(patch: string | LanguageMapPatch | TranslatedStringPatch | TranslatedString): this; static patch(patch: LanguageMapPatch | string): PatchType; get languages(): Language[]; getIfExists(language: Language): string | null; get(language: Language): string; static field(options: { version?: number; nullable?: boolean; }): { decoder: TranslatedStringDecoderStatic; upgrade: typeof TranslatedString.upgrade; downgrade: typeof TranslatedString.downgrade; upgradePatch: (str: PatchType) => PatchType; downgradePatch: (name: TranslatedStringPatch) => PatchType; version?: number; nullable?: boolean; }; static upgrade(data: any): TranslatedString; static downgrade(data: TranslatedString): string; encode(context: EncodeContext): any; clone(): TranslatedString; _append(str: string | TranslatedString): this; append(...str: (string | TranslatedString)[]): this; } export declare class TranslatedStringPatchDecoderStatic implements Decoder> { decode(data: Data): PatchType; patchType(): TranslatedStringPatchDecoderStatic; patchIdentifier(): Decoder; } export declare const TranslatedStringPatchDecoder: TranslatedStringPatchDecoderStatic; export declare class TranslatedStringDecoderStatic implements Decoder { patchType(): TranslatedStringPatchDecoderStatic; patchIdentifier(): Decoder; decode(data: Data): TranslatedString; } export declare const TranslatedStringDecoder: TranslatedStringDecoderStatic; export {}; //# sourceMappingURL=TranslatedString.d.ts.map