"use strict";
/**
 * Copyright (c) 2026 ByteDance Ltd. and/or its affiliates
 * SPDX-License-Identifier: MIT
 *
 * Converter for "hongbao" (red packet) message type.
 */
import { safeParse } from './utils';
export const convertHongbao = (raw) => {
    const parsed = safeParse(raw);
    const text = parsed?.text;
    const textAttr = text ? ` text="${text}"` : '';
    return {
        content: `<hongbao${textAttr}/>`,
        resources: [],
    };
};
