import*as Common from"../common/common.js";import*as Host from"../host/host.js";export var IssueCategory;!function(e){e.CrossOriginEmbedderPolicy="CrossOriginEmbedderPolicy",e.MixedContent="MixedContent",e.SameSiteCookie="SameSiteCookie",e.HeavyAd="HeavyAd",e.ContentSecurityPolicy="ContentSecurityPolicy",e.TrustedWebActivity="TrustedWebActivity",e.LowTextContrast="LowTextContrast",e.Cors="Cors",e.Other="Other"}(IssueCategory||(IssueCategory={}));export var IssueKind;!function(e){e.BreakingChange="BreakingChange",e.PageError="PageError",e.Improvement="Improvement"}(IssueKind||(IssueKind={}));export function getShowThirdPartyIssuesSetting(){return Common.Settings.Settings.instance().createSetting("showThirdPartyIssues",!1)}export function resolveLazyDescription(e){const t=new Map;e?.substitutions?.forEach(((e,r)=>{t.set(r,e())}));const r=Object.assign([],e,{links:e?.links.map((function(e){return{link:e.link,linkTitle:e.linkTitle()}})),substitutions:t});return r||null}export class Issue extends Common.ObjectWrapper.ObjectWrapper{constructor(e,t=null){super(),this.issueCode="string"===typeof e?e:e.code,this.issuesModel=t,Host.userMetrics.issueCreated("string"===typeof e?e:e.umaCode)}code(){return this.issueCode}primaryKey(){throw new Error("Not implemented")}getBlockedByResponseDetails(){return[]}cookies(){return[]}elements(){return[]}heavyAds(){return[]}requests(){return[]}sources(){return[]}isAssociatedWithRequestId(e){for(const t of this.requests())if(t.requestId===e)return!0;return!1}model(){return this.issuesModel}getDescription(){throw new Error("Not implemented")}getCategory(){throw new Error("Not implemented")}isCausedByThirdParty(){return!1}}