import { Observable } from "rxjs";

import { CipherId, UserId } from "@bitwarden/common/types/guid";
import { CipherViewLike } from "@bitwarden/common/vault/utils/cipher-view-like-utils";

import { CipherData } from "../models/data/cipher.data";

export abstract class CipherArchiveService {
  abstract hasArchiveFlagEnabled$: Observable<boolean>;
  abstract archivedCiphers$(userId: UserId): Observable<CipherViewLike[]>;
  abstract userCanArchive$(userId: UserId): Observable<boolean>;
  abstract userHasPremium$(userId: UserId): Observable<boolean>;
  abstract archiveWithServer(ids: CipherId | CipherId[], userId: UserId): Promise<CipherData>;
  abstract unarchiveWithServer(ids: CipherId | CipherId[], userId: UserId): Promise<CipherData>;
  abstract showSubscriptionEndedMessaging$(userId: UserId): Observable<boolean>;
}
