{ "version": 3, "sources": ["apps/partner-center-client/src/app/marketing/base-template-editing/context.ts"], "sourcesContent": ["export class Context {\n public static forExistingTemplate(partnerId: string, templateId: string): Context {\n return new Context(partnerId, templateId, false);\n }\n\n public static forNewTemplate(partnerId: string): Context {\n return new Context(partnerId, null, false);\n }\n\n public static forNewTemplateReplacingLegacy(partnerId: string, legacyTemplateId: string): Context {\n return new Context(partnerId, legacyTemplateId, true);\n }\n\n private constructor(\n private readonly partnerId: string,\n private readonly templateId: string,\n private readonly replacingLegacy: boolean,\n ) {}\n\n isNew(): boolean {\n return this.templateId === null;\n }\n\n isReplacingLegacy(): boolean {\n return this.replacingLegacy;\n }\n\n getPartnerId(): string {\n return this.partnerId;\n }\n\n getExistingTemplateId(): string {\n if (this.templateId === null) {\n throw new Error('get called on context with no template ID');\n }\n return this.templateId;\n }\n}\n"], "mappings": "AAAM,IAAOA,EAAP,MAAOA,CAAO,CACX,OAAOC,oBAAoBC,EAAmBC,EAAkB,CACrE,OAAO,IAAIH,EAAQE,EAAWC,EAAY,EAAK,CACjD,CAEO,OAAOC,eAAeF,EAAiB,CAC5C,OAAO,IAAIF,EAAQE,EAAW,KAAM,EAAK,CAC3C,CAEO,OAAOG,8BAA8BH,EAAmBI,EAAwB,CACrF,OAAO,IAAIN,EAAQE,EAAWI,EAAkB,EAAI,CACtD,CAEAC,YACmBL,EACAC,EACAK,EAAwB,CAFxB,KAAAN,UAAAA,EACA,KAAAC,WAAAA,EACA,KAAAK,gBAAAA,CAChB,CAEHC,OAAK,CACH,OAAO,KAAKN,aAAe,IAC7B,CAEAO,mBAAiB,CACf,OAAO,KAAKF,eACd,CAEAG,cAAY,CACV,OAAO,KAAKT,SACd,CAEAU,uBAAqB,CACnB,GAAI,KAAKT,aAAe,KACtB,MAAM,IAAIU,MAAM,2CAA2C,EAE7D,OAAO,KAAKV,UACd", "names": ["Context", "forExistingTemplate", "partnerId", "templateId", "forNewTemplate", "forNewTemplateReplacingLegacy", "legacyTemplateId", "constructor", "replacingLegacy", "isNew", "isReplacingLegacy", "getPartnerId", "getExistingTemplateId", "Error"] }