import{cT as n,cU as a,cV as i,cW as o}from"./index-CWv_Pcr2.js";class s extends n{trigger;actions;constructor(e){super(e),this.trigger=e.trigger,this.actions=e.actions}}function l(t){return!!t.trigger}const r=function(t){return new s({id:t.id,name:t.name,description:t.description,enabled:t.enabled,trigger:this.map("AutomationTriggerResponse",t.trigger,"AutomationTrigger"),actions:this.map("AutomationActionResponse",t.actions,"AutomationAction")})},g=function(t){return{name:t.name,description:t.description,enabled:t.enabled,trigger:this.map("AutomationTrigger",t.trigger,"AutomationTriggerRequest"),actions:this.map("AutomationAction",t.actions,"AutomationActionRequest")}},m=function(t){return{token:t.token,expiration:this.map("string",t.expiration,"Date"),issued:new Date}},p=t=>{switch(t){case"workers":return"access:workers";case"artifacts":return"access:artifacts";default:return null}},c=function(t){return{apiUrl:t.api_url,csrfEnabled:t.csrf_enabled,auth:t.auth,flags:this.map("FlagResponse",t.flags,"FeatureFlag").filter(a)}},u={...i,FlagResponse:{FeatureFlag:p},SettingsResponse:{Settings:c},CsrfTokenResponse:{CsrfToken:m},AutomationResponse:{Automation:r},AutomationCreate:{AutomationCreateRequest:g}},f=new o(u);export{s as A,l as i,f as m};
//# sourceMappingURL=mapper-CBOLB2hm.js.map
