import { Injectable, signal } from '@angular/core';

export interface SignalServerProvisionNotice {
  serverName: string;
  preferredUsername: string;
  provisionedUsername: string;
}

@Injectable({ providedIn: 'root' })
export class SignalServerProvisionNoticeService {
  readonly notice = signal<SignalServerProvisionNotice | null>(null);

  publish(notice: SignalServerProvisionNotice): void {
    this.notice.set(notice);
  }

  clear(): void {
    this.notice.set(null);
  }
}
