import{aI as s,fp as o,dx as g,c3 as m,dw as l,dy as A,e as h,f as H}from"./app-k0jcl5PQ.js";function f(e){const n=s.useMemo(()=>e.reduce((r,i)=>(r[i.id]=!1,r),{}),[e==null?void 0:e.length]),[a,t]=s.useState(n);function p(r){return a[r]===!0}function c(r,i){if(a[r]===i)return;const d={...a,[r]:i};t(d)}return{emptyWidgets:a,isEmptyWidget:p,setEmptyWidget:c,setEmptyWidgets:t}}function u(e){return{action:H.Search.HOME,application:h.SEARCH,args:[],params:e}}function k(e,n){const a=(n==null?void 0:n.presentationSlug)??null;return{partner:l.getPartnerDashboardAppLink,partnerHome:l.getPartnerHomeAppLink,videoType:(t,p)=>m.getAppLink(t,{...p,context:A.Widget,includeContext:e==null?void 0:e.isAuthenticated},a),series:t=>g.getSeriesAppLink(t,{},a),getPreviewQuestionsAppLink:t=>o.getPreviewQuestionsAppLink(t),company:()=>null,watchHistory:()=>null,widgetVideoList:()=>null,searchSettings:()=>null,searchHome:u,scopedSearchHome:n!=null&&n.channelId?t=>u({...t,scopeId:n.channelId}):()=>null}}export{k as g,f as u};
//# sourceMappingURL=BteZMq7a.chunk.js.map
