import{o,e8 as d,j as t,e9 as l,cn as u,g as m,dv as h,aR as g}from"./app-BgLa5dit.js";import{g as C}from"./DdbSDhh9.chunk.js";function x(c){const n=C(),s=o(d.getContentPartners(c.cursor)),r=o(g.currentUser()),i=e=>m.trigger(n.editContentPartner(e.id));function p(){var e,a;return`/api/search/v4/search?userId=${(e=r.data)==null?void 0:e.id}&customerId=${(a=r.data)==null?void 0:a.customerId}&searchAllChannels=true`}return!r.hasCompleted||!s.hasCompleted?t.jsx(l,{}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"pb-3 w-50",children:t.jsx(u,{placeholder:"Search for a channel",onSuggestionSelected:i,getRemoteUrl:p,getRemotePostBody:e=>({query:e,indices:[{index:"partner_profile"}],searchType:"content"}),formatRemoteSuggestions:e=>e.results,activationLength:0})}),t.jsx(h,{collection:s.data,columns:[{accessor:"name",header:"Name",appLink:e=>n.editContentPartner(e.id)}],collectionAppLink:n.contentPartners(),newObjectAppLink:n.newContentPartner(),objectName:"Channel"})]})}export{x as ContentPartnersView};
//# sourceMappingURL=dwBQGnz3.chunk.js.map
