import { UMB_DOCUMENT_ENTITY_TYPE } from '../../entity.js';
import { UmbControllerBase } from '../../../../../libs/class-api/index.js';
export class UmbDocumentReferenceResponseManagementApiDataMapping extends UmbControllerBase {
    async map(data) {
        return {
            documentType: {
                alias: data.documentType.alias,
                icon: data.documentType.icon,
                name: data.documentType.name,
                unique: data.documentType.id,
            },
            entityType: UMB_DOCUMENT_ENTITY_TYPE,
            variants: data.variants.map((variant) => ({
                ...variant,
                // TODO: Review if we should make `culture` to allow `undefined`. [LK]
                culture: variant.culture ?? null,
            })),
            unique: data.id,
        };
    }
}
export { UmbDocumentReferenceResponseManagementApiDataMapping as api };
