import { AbstractAccountKeyring, AbstractSelfAccountKeyring } from '../../keyring/account_base';
import { AbstractRoomKeyring } from '../../keyring/room_base';
import { AbstractConfigDumpArgs, AbstractConfigLoadArgs } from '../base';

export class RoomKeyConfigLoadArgs extends AbstractConfigLoadArgs {
  public self_kr;
  public peer_kr;
  public room_kr;
  public key_version;

  constructor(
    cipher: Uint8Array,
    self_kr: AbstractSelfAccountKeyring,
    peer_kr: AbstractAccountKeyring,
    room_kr: AbstractRoomKeyring,
    key_version: string
  ) {
    super(cipher);
    this.self_kr = self_kr;
    this.peer_kr = peer_kr;
    this.room_kr = room_kr;
    this.key_version = key_version;
  }
}

export class RoomKeyConfigDumpArgs extends AbstractConfigDumpArgs {
  public self_kr;
  public peer_kr;
  public room_kr;
  public key_version;

  constructor(
    self_kr: AbstractSelfAccountKeyring,
    peer_kr: AbstractAccountKeyring,
    room_kr: AbstractRoomKeyring,
    key_version: string
  ) {
    super();
    this.self_kr = self_kr;
    this.peer_kr = peer_kr;
    this.room_kr = room_kr;
    this.key_version = key_version;
  }
}
