// oxlint-disable typescript/no-misused-spread
import { MessageType } from "@zwave-js/serial";
import { Bytes } from "@zwave-js/shared";
const defaultImplementations = {
    serialize: () => Promise.resolve(Bytes.from([1, 2, 3])),
    tryGetNode: () => undefined,
    getNodeId: () => undefined,
    toLogEntry: () => ({ tags: [] }),
    needsCallbackId: () => true,
    getResponseTimeout: () => undefined,
    getCallbackTimeout: () => undefined,
    markAsSent: () => void 0,
    markAsCompleted: () => void 0,
    expectsAck: () => true,
};
export const dummyResponseOK = {
    type: MessageType.Response,
    expectedResponse: undefined,
    expectedCallback: undefined,
    hasCallbackId: () => false,
    expectsResponse: () => false,
    expectsCallback: () => false,
    isOK: () => true,
    ...defaultImplementations,
};
export const dummyCallbackOK = {
    type: MessageType.Request,
    expectedResponse: undefined,
    expectedCallback: undefined,
    hasCallbackId: () => false,
    expectsResponse: () => false,
    expectsCallback: () => false,
    isOK: () => true,
    ...defaultImplementations,
};
export const dummyCallbackPartial = {
    ...dummyCallbackOK,
    isFinal: () => false,
};
export const dummyResponseNOK = {
    type: MessageType.Response,
    expectedResponse: undefined,
    expectedCallback: undefined,
    hasCallbackId: () => false,
    expectsResponse: () => false,
    expectsCallback: () => false,
    isOK: () => false,
    ...defaultImplementations,
};
export const dummyCallbackNOK = {
    type: MessageType.Request,
    expectedResponse: undefined,
    expectedCallback: undefined,
    hasCallbackId: () => false,
    expectsResponse: () => false,
    expectsCallback: () => false,
    isOK: () => false,
    ...defaultImplementations,
};
export const dummyMessageUnrelated = {
    expectedResponse: undefined,
    expectedCallback: undefined,
    hasCallbackId: () => false,
    expectsResponse: () => false,
    expectsCallback: () => false,
    ...defaultImplementations,
};
export const dummyMessageNoResponseNoCallback = {
    expectedResponse: undefined,
    expectedCallback: undefined,
    hasCallbackId: () => false,
    expectsResponse: () => false,
    expectsCallback: () => false,
    ...defaultImplementations,
};
export const dummyMessageWithResponseNoCallback = {
    expectedResponse: 0xff,
    expectedCallback: undefined,
    hasCallbackId: () => false,
    expectsResponse: () => true,
    expectsCallback: () => false,
    isExpectedResponse: (msg) => msg === dummyResponseOK || msg === dummyResponseNOK,
    ...defaultImplementations,
};
export const dummyMessageNoResponseWithCallback = {
    expectedResponse: undefined,
    expectedCallback: true,
    hasCallbackId: () => true,
    callbackId: 1,
    expectsResponse: () => false,
    expectsCallback: () => true,
    isExpectedCallback: (msg) => msg === dummyCallbackOK || msg === dummyCallbackNOK,
    ...defaultImplementations,
};
export const dummyMessageWithResponseWithCallback = {
    expectedResponse: true,
    expectedCallback: true,
    expectsResponse: () => true,
    expectsCallback: () => true,
    isExpectedResponse: (msg) => msg === dummyResponseOK || msg === dummyResponseNOK,
    isExpectedCallback: (msg) => msg === dummyCallbackOK || msg === dummyCallbackNOK,
    ...defaultImplementations,
};
//# sourceMappingURL=messages.js.map