1import{d as z,b as m,w as N,v as c,g as C,n as f,i as t,j as d,x as y,f as x,t as g,l as b,m as p,ac as G,ad as I,z as P,_ as w,D as S}from"./index.16ba4ea0.js";import{u as h}from"./playlists.da3a5c16.js";import"./vendor-highcharts.9b480a8e.js";import"https://cdn.jsdelivr.net/npm/[email protected]/dist/buttplug-wasm.mjs";const A={class:"space-y-4 text-sm text-zinc-300"},B={class:"border border-red-500/25 rounded-lg p-3 flex items-start gap-2.5"},T={key:0,class:"bg-zinc-800/60 rounded p-2.5 border border-zinc-700/50"},$={class:"text-sm font-medium text-white truncate block mt-0.5"},U={class:"relative"},j={key:1},R={key:2,class:"bg-red-900/30 border border-red-500 text-red-200 p-2.5 rounded text-sm"},_={class:"flex justify-end gap-3 pt-2"},q=z({__name:"AdminDeletePlaylistDialog",props:{modelValue:{type:Boolean},playlistId:{},playlistName:{}},emits:["update:modelValue","close","delete"],setup(r,{emit:V}){const v=r,a=V,k=h(),s=m("Google notice"),u=m(""),n=m(!1),i=m(null);N(()=>v.modelValue,l=>{l&&(s.value="Google notice",u.value="",i.value=null,n.value=!1)});async function D(){if(!!v.playlistId){n.value=!0,i.value=null;try{await k.adminDeletePlaylist(v.playlistId,s.value,u.value),a("delete"),a("update:modelValue",!1)}catch(l){i.value=(l==null?void 0:l.message)||"Failed to delete playlist as admin"}finally{n.value=!1}}}return(l,e)=>(c(),C(S,{"model-value":r.modelValue,"onUpdate:modelValue":e[3]||(e[3]=o=>a("update:modelValue",o)),title:"Admin Delete Playlist"},{default:f(()=>[t("div",A,[t("div",B,[d(y,{name:"alert-circle",class:"w-5 h-5 text-red-400 shrink-0 mt-0.5"}),e[4]||(e[4]=t("div",null,[t("p",{class:"font-medium text-red-200"},"Warning: Admin Action"),t("p",{class:"text-xs mt-0.5"}," This action will soft-delete the playlist and record a moderation log. An owner email notice will be sent if available. ")],-1))]),r.playlistName?(c(),x("div",T,[e[5]||(e[5]=t("span",{class:"text-xs font-semibold uppercase tracking-wider text-zinc-400 block"},"Playlist to Delete",-1)),t("span",$,g(r.playlistName),1)])):b("",!0),t("div",null,[e[7]||(e[7]=t("label",{class:"block mb-1 font-medium text-white"},[p("Reason "),t("span",{class:"text-red-500"},"*")],-1)),t("div",U,[G(t("select",{"onUpdate:modelValue":e[0]||(e[0]=o=>s.value=o),class:"w-full bg-zinc-800 text-white rounded-md px-3 py-2 border border-zinc-700 appearance-none focus:outline-none focus:ring-2 focus:ring-blue-500 text-sm cursor-pointer"},[...e[6]||(e[6]=[t("option",{value:"Google notice"},"Google notice",-1),t("option",{value:"ToS violation"},"ToS violation",-1)])],512),[[I,s.value]]),d(y,{name:"chevron-down",class:"w-4 h-4 absolute right-3 top-1/2 -translate-y-1/2 text-zinc-400 pointer-events-none"})])]),s.value==="Google notice"?(c(),x("div",j,[e[8]||(e[8]=t("label",{class:"block mb-1 font-medium text-white"},[p("Reference ID "),t("span",{class:"text-zinc-500 text-xs font-normal"},"(optional)")],-1)),d(P,{modelValue:u.value,"onUpdate:modelValue":e[1]||(e[1]=o=>u.value=o),placeholder:"e.g. 6-3884000041778-1566241192"},null,8,["modelValue"]),e[9]||(e[9]=t("p",{class:"text-xs text-zinc-400 mt-1"},"Google removal reference ID for owner notification email.",-1))])):b("",!0),i.value?(c(),x("div",R,g(i.value),1)):b("",!0),t("div",_,[d(w,{theme:"light",onClick:e[2]||(e[2]=o=>{a("update:modelValue",!1),a("close")}),disabled:n.value,type:"button"},{default:f(()=>[...e[10]||(e[10]=[p(" Cancel ",-1)])]),_:1},8,["disabled"]),d(w,{theme:"red",loading:n.value,onClick:D,type:"button"},{default:f(()=>[...e[11]||(e[11]=[p(" Delete Playlist ",-1)])]),_:1},8,["loading"])])])]),_:1},8,["model-value"]))}});export{q as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.