import { BASE_IMAGE_URL } from "../../app/AppCache";
import { StringUtils } from "../../util/StringUtils";

export interface GetMsgListRequestModel {
  state: number;
  page: number;
  pageSize: number;
}

export class AddFeedBackRequestModel {
  applicationId: string = ""
  alarmSignal: string = ""
  alarmName: string = ""
  type: string = ""
  title: string = ""
  content: string = ""
  applicationName: string = ""
}

export class FeedBackBean {
  baseType: number = 1
  id: string = ""
  type: number = 0
  createTime: string = ""
  title: string = ""
  content: string = ""
  applicationName: string = ""
  replyStatus: number = 0
  replyContent: string = ""
  replier: string = ""
  updateTime: string = ""

  getReplyContent() :string{
    if (StringUtils.isNullOrEmpty(this.replyContent)) {
      return ""
    }
    let parts: string[] = [];
    parts.push("<html><meta  name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=yes\" http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /><body><p style=\"word-break:break-all; padding:12px;\">")
    parts.push(this.replyContent.replaceAll("/prod-api/profile", BASE_IMAGE_URL+"/profile"))
    parts.push("</body></html>")
    return parts.join("")
  }

}