import { BaseRecord, utils } from "@credo-ts/core";

//#region ../didcomm/src/modules/basic-messages/repository/DidCommBasicMessageRecord.ts
var DidCommBasicMessageRecord = class DidCommBasicMessageRecord extends BaseRecord {
	constructor(props) {
		super();
		this.type = DidCommBasicMessageRecord.type;
		if (props) {
			this.id = props.id ?? utils.uuid();
			this.createdAt = props.createdAt ?? /* @__PURE__ */ new Date();
			this.content = props.content;
			this.sentTime = props.sentTime;
			this.connectionId = props.connectionId;
			this._tags = props.tags ?? {};
			this.role = props.role;
			this.threadId = props.threadId;
			this.parentThreadId = props.parentThreadId;
		}
	}
	getTags() {
		return {
			...this._tags,
			connectionId: this.connectionId,
			role: this.role,
			threadId: this.threadId,
			parentThreadId: this.parentThreadId
		};
	}
};
DidCommBasicMessageRecord.type = "BasicMessageRecord";

//#endregion
export { DidCommBasicMessageRecord };
//# sourceMappingURL=DidCommBasicMessageRecord.mjs.map