import{getStatusCodesFromWarp10 as t}from"@clevercloud/client/esm/access-logs.js";import{getWarp10AccessLogsToken as e}from"@clevercloud/client/esm/api/v2/warp-10.js";import{THIRTY_SECONDS as o}from"@clevercloud/client/esm/request.fetch-with-timeout.js";import{ONE_DAY as i}from"@clevercloud/client/esm/with-cache.js";import{defineSmartComponent as n}from"./lib/define-smart-component.js";import{sendToApi as a,sendToWarp as s}from"./lib/send-to-api.js";import"./cc-smart-container.js";import"./cc-tile-status-codes.js";n({selector:"cc-tile-status-codes",params:{apiConfig:{type:Object},ownerId:{type:String},appId:{type:String,optional:!0}},onContextUpdate({context:n,updateComponent:p,signal:c}){const{apiConfig:r,ownerId:l,appId:d}=n;p("state",{type:"loading"}),async function({apiConfig:n,signal:p,ownerId:c,appId:r}){const l=await e({orgaId:c}).then(a({apiConfig:n,signal:p,cacheDelay:i}));return t({warpToken:l,ownerId:c,appId:r}).then(s({apiConfig:n,signal:p,timeout:o}))}({apiConfig:r,signal:c,ownerId:l,appId:d}).then((t=>{p("state",{type:"loaded",statusCodes:t})})).catch((t=>{console.log(t),p("state",{type:"error"})}))}});
//# sourceMappingURL=cc-tile-status-codes.smart.js.map
