).catch(e=>{(0,p.default)({getState:a}).error(`API call to users.consent.get with reason ${r} failed, initiated by generated fetcher`),s(e)})}));f.meta={name:"usersConsentGetFetcher",key:"createFetcherUsersConsentGetFetcher",description:"users.consent.get generated fetcher"};let g=(0,u.Ay)("Get the user consent scopes granted for an app",async(e,a,{appId:t,refetch:n=!1,reason:s})=>{let l=a(),o=(0,p.default)({getState:a,label:_}),{lastUpdated:c}=(0,r.iV)(l,t)??{},i=n||void 0===c||Date.now()-c>36e5;if(t&&i)try{let a=await e(f({appId:t,reason:s}));e((0,b.F)({appId:t,scopes:{grantedScopeIds:a.scopes.split(",").filter(Boolean),scopeLabelsById:a.labels,availableScopeIds:a.available_scopes.split(",").filter(Boolean)}}))}catch(e){o.error(Error(`Error getting scopes: ${e}`))}});g.meta={name:"getUserConsentScopes",key:"createThunkGetUserConsentScopes",description:"Get the user consent scopes granted for an app"};let A=(0,i.A)("users.consent.remove generated fetcher",(e,a,t)=>new o.S((n,s)=>{let{abortSignal:l,reason:r,...o}=t,i=(0,m.VA)(o);e((0,c.apiCall)({method:"users.consent.remove",args:i,abortSignal:l,reason:r})).then(e=>{n(e)}).catch(e=>{(0,p.default)({getState:a}).error(`API call to users.consent.remove with reason ${r} failed, initiated by generated fetcher`),s(e)})}));A.meta={name:"usersConsentRemoveFetcher",key:"createFetcherUsersConsentRemoveFetcher",description:"users.consent.remove generated fetcher"};let x=(0,u.Ay)("Remove user consent for provided scopes for an app",async(e,a,{appId:t,scopeIds:n,reason:s})=>{let l=(0,p.default)({getState:a,label:_});try{await e(A({appId:t,scopes:n.join(","),reason:s})),e((0,b.ID)({appId:t,scopeIds:n}))}catch{l.error(Error(`Error removing scopes: ${n}`))}});x.meta={name:"removeUserConsentScopes",key:"createThunkRemoveUserConsentScopes",description:"Remove user consent for provided scopes for an app"};let useUserConsentScopes=(e,a)=>{let t=(0,s.wA)(),o=(0,l.d4)(a=>(0,r.iV)(a,e)),[c,i]=(0,n.useState)(!1),[p,m]=(0,n.useState)(!1),{availableScopeIds:d,grantedScopeIds:u,scopeLabelsById:b}=o??{},_=(0,n.useCallback)(async(n=!1)=>{e&&(m(!0),await t(g({appId:e,refetch:n,reason:a})),m(!1))},[e,t,a]);return{isUpdatingScopes:c,isLoadingScopes:p,grantedScopeIds:u,scopeLabelsById:b,availableScopeIds:d,getScopes:_,addScopes:(0,n.useCallback)(async n=>{e&&0!==n.length&&(i(!0),await t(h({appId:e,scopeIds:n,reason:a})),i(!1))},[e,t,a]),removeScopes:(0,n.useCallback)(async n=>{e&&0!==n.length&&(i(!0),await t(x({appId:e,scopeIds:n,reason:a})),i(!1))},[e,t,a])}}},0xaf1c3c94:(e,a,t)=>{"use strict";t.d(a,{s:()=>i});var n=t(0x194add20b),s=t(0xe8e28706),l=t(0x151a93a75),r=t(0x1cf0d97e1),o=t(0x20c81ddcb),c=t(0x14149c126);let i=(0,r.Ay)((e,a)=>{let t=(0,l.JE)(e,a),r="on"===(0,c._Z)(e,"ai_consent_banner"),i=(0,l.R7)(a),{availableScopeIds:p,grantedScopeIds:m}=(0,o.iV)(e,i)??{},d=!!m&&m.length>0,u=!!p&&p.length>0,b=r&&(0,s.UH)(e,i)&&!(0,n.kJ)(i)&&(u||d);return t||b});i.meta={name:"shouldShowAppPermissions",key:"createSelectorShouldShowAppPermissions",description:(e,a)=>{let t=(0,l.JE)(e,a),r="on"===(0,c._Z)(e,"ai_consent_banner"),i=(0,l.R7)(a),{availableScopeIds:p,grantedScopeIds:m}=(0,o.iV)(e,i)??{},d=!!m&&m.length>0,u=!!p&&p.length>0,b=r&&(0,s.UH)(e,i)&&!(0,n.kJ)(i)&&(u||d);return t||b}}}}]); //# sourceMappingURL=https://slack.com/source-maps/bv1-13/gantry-v2-async-client-about-ai-app-view.736535bfa41e3f9fbb42.min.js.mapØA —Eoúô