import{j as a,cn as c,g as o,h as n,i as s}from"./app-BgLa5dit.js";const p="/ajax/playlists/search/instant";function S(t){return{application:s.PLAYLISTS,action:n.Playlists.EDIT_PLAYLIST,args:[t.id]}}function g(t){return o.trigger(S(t))}function L(t){const i=t?{application:s.PLAYLISTS,action:n.Playlists.SEARCH_PLAYLISTS,params:{query:t}}:{application:s.PLAYLISTS,action:n.Playlists.PLAYLISTS};o.trigger(i)}const u=t=>{var i,e,l,r;return a.jsxs("div",{children:[a.jsxs("p",{className:"mb-0",children:[a.jsx("strong",{children:(i=t.playlist)==null?void 0:i.name})," (",(e=t.playlist)==null?void 0:e.id,")"]}),a.jsx("em",{children:((r=(l=t.playlist)==null?void 0:l.metadata)==null?void 0:r.internalDescription)??"No internal description"})]})};function m(t){return a.jsx("div",{className:"pb-3 w-50",children:a.jsx(c,{initialQuery:t.query,placeholder:"Search for a playlist",onSuggestionSelected:g,getSuggestionComponent:i=>a.jsx(u,{playlist:i}),getRemoteUrl:i=>`${p}?query=${i}`,activationLength:2,onSubmit:L})})}export{m as P};
//# sourceMappingURL=CSDkhdb-.chunk.js.map
