import { MatrixActor } from '@open-matrix/core';

export class GreeterActor extends MatrixActor {
  static accepts = {
    echo: {},
    getStatus: {},
  };

  onEcho(payload: { message?: string }) {
    return {
      ok: true,
      message: payload.message ?? null,
      actor: 'GreeterActor',
    };
  }

  onGetStatus() {
    return {
      ok: true,
      actor: 'GreeterActor',
      mount: 'demo.greeter',
    };
  }
}
