/*
 * Copyright (c) 2023-2025 Datalayer, Inc.
 * Distributed under the terms of the Modified BSD License.
 */
export class Outbound {
    id;
    uid;
    subType;
    name;
    description;
    tags;
    status;
    emailSubject;
    emailContent;
    senderUid;
    senderDisplayName;
    recipients;
    creationDate;
    lastUpdateDate;
    launchedDate;
    constructor(u) {
        this.id = u.id;
        this.uid = u.uid;
        this.subType = u.subType;
        this.name = u.name;
        this.description = u.description;
        this.tags = u.tags ?? [];
        this.status = u.status;
        this.emailSubject = u.emailSubject;
        this.emailContent = u.emailContent;
        this.senderUid = u.senderUid;
        this.senderDisplayName = u.senderDisplayName;
        this.recipients = u.recipients;
        this.creationDate = new Date(u.creationDate);
        this.lastUpdateDate = new Date(u.lastUpdateDate);
        this.launchedDate = u.launchedDate ? new Date(u.launchedDate) : undefined;
    }
}
/**
 * Convert the raw user object to {@link IOutbound}.
 *
 * @param u Raw user object from DB
 * @returns Outbound
 */
export function asOutbound(u) {
    return new Outbound(u);
}
