import { GROUP_MESSAGE_KIND } from "applesauce-core/helpers";
import { blueprint } from "../event-factory.js";
import { setMetaTags } from "../operations/common.js";
import { setShortTextContent } from "../operations/content.js";
import { setGroupPointer, addPreviousRefs } from "../operations/group.js";
/** A blueprint for a NIP-29 group message */
export function GroupMessageBlueprint(group, content, options) {
    return blueprint(GROUP_MESSAGE_KIND, 
    // include group id "h" tag
    setGroupPointer(group), 
    // include "previous" events tags
    options?.previous && addPreviousRefs(options.previous), 
    // Set text content
    setShortTextContent(content, options), 
    // Add common meta tags
    setMetaTags(options));
}
