import{c4 as m,bc as P,az as y,aj as g,ao as c,aF as d,L as h,m as f,n as x,o as r,W as A,E as T,r as L,v as k,T as C,f as j}from"./app-k0jcl5PQ.js";import{P as w}from"./dBn0j60R.chunk.js";import"./CGIhFPIn.chunk.js";import"./DLmnDxSd.chunk.js";import"./CW7x8M-z.chunk.js";import"./DV1GpLCe.chunk.js";import"./Di9d6zcy.chunk.js";import"./CKctgafI.chunk.js";import"./C3DvQ1wU.chunk.js";const t=h.encloseNamespace("playlists.newPlaylist");function D(s){const n=m(),i=P(),a=y(g.currentUser()),l=o=>{const p=e=>{i.success(t("success",{name:o.name,escapeText:!0})),r.logUserAction({id:e.id,name:e.name},r.mergeOptions(s.analyticsOptions,{actionType:L.Create,entity:T.Playlist,workflowPhase:A.Complete})),s.closePopup(),k.trigger({application:s.application,action:j.Playlists.PLAYLIST,args:[null,e.id,C.slugify(e.name)]})},u=()=>{i.error(t("error")),s.closePopup()};f(n,x.createPlaylist(a.data.id,o,p,u))};return c.jsx(d,{title:t("title"),closePopup:s.closePopup,showLoadingSpinner:!a.data,children:!!a.data&&c.jsx(w,{savePlaylist:l,onClickCancel:s.closePopup,cancelButtonClass:"link",submitText:t("submit")})})}export{D as NewPlaylistView};
//# sourceMappingURL=B3XABzoi.chunk.js.map
