/** @packageDocumentation CombinedTag — a priority-ordered union of multiple Tag instances. */ import { Tag } from "./tag.js"; import { PropertyMap } from "./toolkit/propertyMap.js"; import type { VariantMap } from "./toolkit/variant.js"; /** * A combined / union tag that delegates to multiple underlying tags in * priority order. Getters return the first non-empty value; setters write * to all non-null tags so that every format stays in sync. */ export declare class CombinedTag extends Tag { /** Internal list of tags, some of which may be `null` (absent). */ private _tags; /** * @param tags Ordered list of tags in descending priority. `null` entries * are allowed and are simply skipped during reads. */ constructor(tags: (Tag | null)[]); /** The underlying non-null tags in priority order. */ get tags(): Tag[]; /** Replace the internal tag list (used when tags are added/removed). */ setTags(tags: (Tag | null)[]): void; /** @inheritdoc */ get title(): string; /** Writes `v` to every non-null tag in the list. */ set title(v: string); /** @inheritdoc */ get artist(): string; /** Writes `v` to every non-null tag in the list. */ set artist(v: string); /** @inheritdoc */ get album(): string; /** Writes `v` to every non-null tag in the list. */ set album(v: string); /** @inheritdoc */ get comment(): string; /** Writes `v` to every non-null tag in the list. */ set comment(v: string); /** @inheritdoc */ get genre(): string; /** Writes `v` to every non-null tag in the list. */ set genre(v: string); /** @inheritdoc */ get year(): number; /** Writes `v` to every non-null tag in the list. */ set year(v: number); /** @inheritdoc */ get track(): number; /** Writes `v` to every non-null tag in the list. */ set track(v: number); /** `true` when every non-null underlying tag reports itself as empty. */ get isEmpty(): boolean; /** * Merge the property maps from all underlying tags, with higher-priority * tags overwriting duplicate keys from lower-priority ones. * * @returns A unified {@link PropertyMap}. */ properties(): PropertyMap; /** * Delegate to the highest-priority tag. * * @param props The property map to apply. * @returns Unsupported properties returned by the primary tag, or `props` * unchanged when no tags are present. */ setProperties(props: PropertyMap): PropertyMap; /** * Collect the union of complex property keys from all underlying tags. * * @returns Deduplicated array of complex property key strings. */ complexPropertyKeys(): string[]; /** * Return complex properties for `key` from the first tag that has any. * * @param key The property key (e.g. `"PICTURE"`). * @returns The first non-empty result found, or an empty array. */ complexProperties(key: string): VariantMap[]; /** * Delegate complex property writes to the highest-priority tag. * * @param key The property key (e.g. `"PICTURE"`). * @param value The new values to store. * @returns `true` if stored successfully, `false` if no tags are present. */ setComplexProperties(key: string, value: VariantMap[]): boolean; /** * Return the first non-empty string produced by `getter` across all non-null tags. * * @param getter A function that extracts a string from a tag. * @returns The first non-empty string, or `""` if all tags return empty strings. */ private firstString; /** * Return the first non-zero number produced by `getter` across all non-null tags. * * @param getter A function that extracts a number from a tag. * @returns The first non-zero value, or `0` if all tags return zero. */ private firstNumber; /** * Apply `setter` to every non-null tag in the list. * * @param setter A function that writes a value to the given tag. */ private setOnAll; } //# sourceMappingURL=combinedTag.d.ts.map